From 9fd889dbca3b95bcae3739a4b12af4dbb084397f Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Fri, 3 Jul 2015 17:42:26 -0400 Subject: [PATCH] Dreams Refactor --- code/modules/flufftext/Dreaming.dm | 41 +++++++++++++++--------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/code/modules/flufftext/Dreaming.dm b/code/modules/flufftext/Dreaming.dm index 420b110080d..a6c8ee86e5b 100644 --- a/code/modules/flufftext/Dreaming.dm +++ b/code/modules/flufftext/Dreaming.dm @@ -1,25 +1,26 @@ - -var/list/dreams = list( - "an ID card","a bottle","a familiar face","a crewmember","a toolbox","a security officer","the captain", - "voices from all around","deep space","a doctor","the engine","a traitor","an ally","darkness", - "light","a scientist","a monkey","a catastrophe","a loved one","a gun","warmth","freezing","the sun", - "a hat","the Luna","a ruined station","a planet","plasma","air","the medical bay","the bridge","blinking lights", - "a blue light","an abandoned laboratory","Nanotrasen","The Syndicate","blood","healing","power","respect", - "riches","space","a crash","happiness","pride","a fall","water","flames","ice","melons","flying","the eggs","money", - "the head of personnel","the head of security","a chief engineer","a research director","a chief medical officer", - "the detective","the warden","a member of the internal affairs","a station engineer","the janitor","atmospheric technician", - "the quartermaster","a cargo technician","the botanist","a shaft miner","the psychologist","the chemist","the geneticist", - "the virologist","the roboticist","the chef","the bartender","the chaplain","the librarian","a mouse","an ert member", - "a beach","the holodeck","a smokey room","a voice","the cold","a mouse","an operating table","the bar","the rain","a skrell", - "a unathi","a tajaran","the ai core","the mining station","the research station","a beaker of strange liquid", - ) - mob/living/carbon/proc/dream() dreaming = 1 - + var/list/dreams = list( + "an ID card","a bottle","a familiar face","a crewmember","a toolbox","a security officer","the captain", + "voices from all around","deep space","a doctor","the engine","a traitor","an ally","darkness", + "light","a scientist","a monkey","a catastrophe","a loved one","a gun","warmth","freezing","the sun", + "a hat","the Cyberiad","a ruined station","a planet","plasma","air","the medical bay","the bridge","blinking lights", + "a blue light","an abandoned laboratory","Nanotrasen","The Syndicate","blood","healing","power","respect", + "riches","space","a crash","happiness","pride","a fall","water","flames","ice","melons","flying","the eggs","money", + "the head of personnel","the head of security","a chief engineer","a research director","a chief medical officer", + "the detective","the warden","a member of the internal affairs","a station engineer","the janitor","atmospheric technician", + "the quartermaster","a cargo technician","the botanist","a shaft miner","the psychologist","the chemist","the geneticist", + "the virologist","the roboticist","the chef","the bartender","the chaplain","the librarian", "the brig physician", "the pod pilot", + "the barber", "the mechanic", "the magistrate", "the nanotrasen representative", "the blueshield", "a mouse","an ert member", + "a beach","the holodeck","a smokey room","a voice","the cold","a mouse","an operating table","the bar","the rain","a skrell", + "a unathi","a tajaran", "a vulpkanin", "a slime", "an ipc", "a vox", "a plasmaman", "a grey", "a kidan", "a diona", "the ai core", + "the mining station","the research station", "a beaker of strange liquid" + ) spawn(0) for(var/i = rand(1,4),i > 0, i--) - src << "\blue ... [pick(dreams)] ..." + var/dream_image = pick(dreams) + dreams -= dream_image + src << "... [dream_image] ..." sleep(rand(40,70)) if(paralysis <= 0) dreaming = 0 @@ -27,8 +28,8 @@ mob/living/carbon/proc/dream() dreaming = 0 return 1 -mob/living/carbon/proc/handle_dreams() +/mob/living/carbon/proc/handle_dreams() if(client && !dreaming && prob(5)) dream() -mob/living/carbon/var/dreaming = 0 +/mob/living/carbon/var/dreaming = 0