forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request tgstation#33958 from XDTM/Morpheus
Dreaming Improvements
- Loading branch information
Showing
5 changed files
with
1,158 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,61 @@ | ||
/mob/living/carbon/proc/dream() | ||
set waitfor = 0 | ||
var/list/dreams = GLOB.dream_strings.Copy() | ||
for(var/obj/item/bedsheet/sheet in loc) | ||
dreams += sheet.dream_messages | ||
var/list/dream_images = list() | ||
for(var/i in 1 to rand(3, rand(5, 10))) | ||
dream_images += pick_n_take(dreams) | ||
dreaming++ | ||
for(var/i in 1 to dream_images.len) | ||
addtimer(CALLBACK(src, .proc/experience_dream, dream_images[i]), ((i - 1) * rand(30,60))) | ||
return 1 | ||
|
||
/mob/living/carbon/proc/handle_dreams() | ||
if(prob(5) && !dreaming) | ||
if(prob(10) && !dreaming) | ||
dream() | ||
|
||
/mob/living/carbon/proc/experience_dream(dream_image) | ||
dreaming-- | ||
/mob/living/carbon/proc/dream() | ||
set waitfor = FALSE | ||
var/list/dream_fragments = list() | ||
var/fragment = "" | ||
|
||
dream_fragments += "you see" | ||
|
||
//Subject | ||
fragment += pick(GLOB.dream_strings) | ||
if(prob(50)) | ||
fragment = replacetext(fragment, "%ADJECTIVE%", pick(GLOB.adjectives)) | ||
else | ||
fragment = replacetext(fragment, "%ADJECTIVE% ", "") | ||
if(findtext(fragment, "%A% ")) | ||
fragment = "\a [replacetext(fragment, "%A% ", "")]" | ||
dream_fragments += fragment | ||
|
||
//Verb | ||
fragment = "" | ||
if(prob(50)) | ||
if(prob(35)) | ||
fragment += "[pick(GLOB.adverbs)] " | ||
fragment += pick(GLOB.ing_verbs) | ||
else | ||
fragment += "will " | ||
fragment += pick(GLOB.verbs) | ||
dream_fragments += fragment | ||
|
||
if(prob(25)) | ||
dream_sequence(dream_fragments) | ||
return | ||
|
||
//Object | ||
fragment = "" | ||
fragment += pick(GLOB.dream_strings) | ||
if(prob(50)) | ||
fragment = replacetext(fragment, "%ADJECTIVE%", pick(GLOB.adjectives)) | ||
else | ||
fragment = replacetext(fragment, "%ADJECTIVE% ", "") | ||
if(findtext(fragment, "%A% ")) | ||
fragment = "\a [replacetext(fragment, "%A% ", "")]" | ||
dream_fragments += fragment | ||
|
||
dreaming = TRUE | ||
dream_sequence(dream_fragments) | ||
|
||
/mob/living/carbon/proc/dream_sequence(list/dream_fragments) | ||
if(stat != UNCONSCIOUS || InCritical()) | ||
dreaming = FALSE | ||
return | ||
to_chat(src, "<span class='notice'><i>... [dream_image] ...</i></span>") | ||
var/next_message = dream_fragments[1] | ||
dream_fragments.Cut(1,2) | ||
to_chat(src, "<span class='notice'><i>... [next_message] ...</i></span>") | ||
if(LAZYLEN(dream_fragments)) | ||
addtimer(CALLBACK(src, .proc/dream_sequence, dream_fragments), rand(10,30)) | ||
else | ||
dreaming = FALSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,44 @@ | ||
a familiar face | ||
a crewmember | ||
a security officer | ||
a doctor | ||
an engineer | ||
a miner | ||
a slime | ||
an alien | ||
a traitor | ||
an ally | ||
a scientist | ||
a monkey | ||
a loved one | ||
a monster | ||
the captain | ||
a hat | ||
an ID card | ||
a bottle | ||
a toolbox | ||
a gun | ||
%A% %ADJECTIVE% familiar face | ||
%A% %ADJECTIVE% crewmember | ||
%A% %ADJECTIVE% security officer | ||
%A% %ADJECTIVE% doctor | ||
%A% %ADJECTIVE% engineer | ||
%A% %ADJECTIVE% miner | ||
%A% %ADJECTIVE% slime | ||
%A% %ADJECTIVE% alien | ||
%A% %ADJECTIVE% traitor | ||
%A% %ADJECTIVE% ally | ||
%A% %ADJECTIVE% scientist | ||
%A% %ADJECTIVE% monkey | ||
%A% %ADJECTIVE% loved one | ||
%A% %ADJECTIVE% monster | ||
the %ADJECTIVE% captain | ||
%A% %ADJECTIVE% hat | ||
%A% %ADJECTIVE% ID card | ||
%A% %ADJECTIVE% bottle | ||
%A% %ADJECTIVE% toolbox | ||
%A% %ADJECTIVE% gun | ||
the sun | ||
the engine | ||
the station | ||
a planet | ||
%A% %ADJECTIVE% planet | ||
the medical bay | ||
the bridge | ||
the brig | ||
a shuttle | ||
a laboratory | ||
the %ADJECTIVE% bridge | ||
the %ADJECTIVE% brig | ||
%A% %ADJECTIVE% shuttle | ||
%A% %ADJECTIVE% laboratory | ||
Nanotrasen | ||
the Syndicate | ||
the Wizard Federation | ||
blood | ||
plasma | ||
air | ||
warmth | ||
freezing | ||
wind | ||
darkness | ||
light | ||
life | ||
death | ||
blinking lights | ||
healing | ||
power | ||
respect | ||
riches | ||
space | ||
time | ||
deep space | ||
a crash | ||
a catastrophe | ||
happiness | ||
pride | ||
a fall | ||
%ADJECTIVE% blood | ||
%ADJECTIVE% plasma | ||
%ADJECTIVE% wind | ||
%ADJECTIVE% darkness | ||
%ADJECTIVE% light | ||
%ADJECTIVE% death | ||
%ADJECTIVE% blinking lights | ||
%ADJECTIVE% power | ||
%ADJECTIVE% riches | ||
water | ||
flames | ||
ice | ||
melons | ||
flying | ||
voices from all around | ||
%ADJECTIVE% flames | ||
some %ADJECTIVE% melons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
accidentally | ||
angrily | ||
annually | ||
anxiously | ||
awkwardly | ||
badly | ||
blindly | ||
boastfully | ||
boldly | ||
bravely | ||
briefly | ||
brightly | ||
busily | ||
calmly | ||
carefully | ||
carelessly | ||
cautiously | ||
cheerfully | ||
clearly | ||
correctly | ||
courageously | ||
crossly | ||
cruelly | ||
daily | ||
defiantly | ||
deliberately | ||
doubtfully | ||
easily | ||
elegantly | ||
enormously | ||
enthusiastically | ||
equally | ||
eventually | ||
exactly | ||
faithfully | ||
fatally | ||
fiercely | ||
fondly | ||
foolishly | ||
fortunately | ||
frantically | ||
gently | ||
gladly | ||
gracefully | ||
greedily | ||
happily | ||
hastily | ||
honestly | ||
hourly | ||
hungrily | ||
innocently | ||
inquisitively | ||
irritably | ||
irritatingly | ||
joyously | ||
justly | ||
kindly | ||
laughingly | ||
lazily | ||
loosely | ||
loudly | ||
madly | ||
merrily | ||
monthly | ||
mortally | ||
mysteriously | ||
nakedly | ||
nearly | ||
neatly | ||
nervously | ||
never | ||
noisily | ||
obediently | ||
obnoxiously | ||
obnoxiously | ||
often | ||
painfully | ||
perfectly | ||
politely | ||
poorly | ||
powerfully | ||
promptly | ||
punctually | ||
quickly | ||
quietly | ||
rapidly | ||
rarely | ||
really | ||
recklessly | ||
regularly | ||
reluctantly | ||
repeatedly | ||
rightfully | ||
roughly | ||
rudely | ||
sadly | ||
safely | ||
seldom | ||
selfishly | ||
seriously | ||
shakily | ||
sharply | ||
shrilly | ||
shyly | ||
silently | ||
sleepily | ||
slowly | ||
smoothly | ||
softly | ||
solemnly | ||
sometimes | ||
soon | ||
speedily | ||
stealthily | ||
sternly | ||
successfully | ||
suddenly | ||
suspiciously | ||
swiftly | ||
tenderly | ||
tensely | ||
thoughtfully | ||
tightly | ||
tomorrow | ||
truthfully | ||
underhandedly | ||
unexpectedly | ||
victoriously | ||
violently | ||
vivaciously | ||
warmly | ||
weakly | ||
wearily | ||
wildly | ||
yearly |
Oops, something went wrong.