Hallucinations 2.0

This commit is contained in:
davipatury
2017-03-06 18:41:15 -03:00
parent 74931d3934
commit c1a73eb095
9 changed files with 532 additions and 208 deletions
@@ -527,9 +527,9 @@
H.healths.icon_state = "health7"
else
switch(H.hal_screwyhud)
if(1) H.healths.icon_state = "health6"
if(2) H.healths.icon_state = "health7"
if(5) H.healths.icon_state = "health0"
if(SCREWYHUD_CRIT) H.healths.icon_state = "health6"
if(SCREWYHUD_DEAD) H.healths.icon_state = "health7"
if(SCREWYHUD_HEALTHY) H.healths.icon_state = "health0"
else
switch(100 - ((flags & NO_PAIN) ? 0 : H.traumatic_shock) - H.staminaloss)
if(100 to INFINITY) H.healths.icon_state = "health0"
@@ -13,7 +13,7 @@
amount = amount * species.stun_mod
..()
/mob/living/carbon/human/SetSleeping(amount, updating = 1)
/mob/living/carbon/human/SetSleeping(amount, updating = 1, no_alert = FALSE)
if(species)
amount = amount * species.stun_mod
..()
+1 -1
View File
@@ -345,7 +345,7 @@
if(..())
handle_dreams()
adjustStaminaLoss(-10)
if(prob(10) && health && !hal_crit)
if(prob(10) && health && hal_screwyhud != SCREWYHUD_CRIT)
spawn(0)
emote("snore")
// Keep SSD people asleep
+6 -6
View File
@@ -354,19 +354,19 @@
// SLEEPING
/mob/living/Sleeping(amount, updating = 1)
SetSleeping(max(sleeping, amount), updating)
/mob/living/Sleeping(amount, updating = 1, no_alert = FALSE)
SetSleeping(max(sleeping, amount), updating, no_alert)
/mob/living/SetSleeping(amount, updating = 1)
/mob/living/SetSleeping(amount, updating = 1, no_alert = FALSE)
sleeping = max(amount, 0)
update_sleeping_effects()
update_sleeping_effects(no_alert)
if(updating)
update_stat()
update_canmove()
/mob/living/AdjustSleeping(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1)
/mob/living/AdjustSleeping(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1, no_alert = FALSE)
var/new_value = directional_bounded_sum(sleeping, amount, bound_lower, bound_upper)
SetSleeping(new_value, updating)
SetSleeping(new_value, updating, no_alert)
// SLOWED
+3 -2
View File
@@ -30,9 +30,10 @@
else
clear_fullscreen("nearsighted")
/mob/living/update_sleeping_effects()
/mob/living/update_sleeping_effects(no_alert = FALSE)
if(sleeping)
throw_alert("asleep", /obj/screen/alert/asleep)
if(!no_alert)
throw_alert("asleep", /obj/screen/alert/asleep)
else
clear_alert("asleep")