Merge pull request #5694 from Walter0o/dev

dream and hallucination improvements
This commit is contained in:
Chinsky
2014-07-20 17:44:07 +04:00
2 changed files with 23 additions and 21 deletions
+21 -19
View File
@@ -1,24 +1,25 @@
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","phoron","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 Luna","a ruined station","a planet","phoron","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",
)
spawn(0)
for(var/i = rand(1,4),i > 0, i--)
var/dream_image = pick(dreams)
dreams -= dream_image
src << "\blue <i>... [dream_image] ...</i>"
src << "\blue <i>... [pick(dreams)] ...</i>"
sleep(rand(40,70))
if(paralysis <= 0)
dreaming = 0
@@ -27,6 +28,7 @@ mob/living/carbon/proc/dream()
return 1
mob/living/carbon/proc/handle_dreams()
if(prob(5) && !dreaming) dream()
if(client && !dreaming && prob(5))
dream()
mob/living/carbon/var/dreaming = 0
mob/living/carbon/var/dreaming = 0
+2 -2
View File
@@ -22,7 +22,7 @@ mob/living/carbon/var
mob/living/carbon/proc/handle_hallucinations()
if(handling_hal) return
handling_hal = 1
while(hallucination > 20)
while(client && hallucination > 20)
sleep(rand(200,500)/(hallucination/25))
var/halpick = rand(1,100)
switch(halpick)
@@ -408,4 +408,4 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite
target << F.up
*/
F.updateimage()
F.updateimage()