Skip to content

Commit

Permalink
bugfix: remove update_flags where it is not needed (ss220-space#4041)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rerik007 authored and Etrnlmelancholy committed Jan 3, 2024
1 parent 2dbca46 commit 4aa64f1
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 39 deletions.
4 changes: 2 additions & 2 deletions code/game/gamemodes/shadowling/shadowling_abilities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -521,13 +521,13 @@
var/update_flags = STATUS_UPDATE_NONE
if(!is_shadow_or_thrall(M))
to_chat(M, "<span class='warning'><b>You breathe in the black smoke, and your eyes burn horribly!</b></span>")
update_flags |= M.EyeBlind(5, FALSE)
M.EyeBlind(10 SECONDS)
if(prob(25))
M.visible_message("<b>[M]</b> claws at [M.p_their()] eyes!")
M.Stun(4 SECONDS)
else
to_chat(M, "<span class='notice'><b>You breathe in the black smoke, and you feel revitalized!</b></span>")
update_flags |= M.heal_organ_damage(10, 10, updating_health = FALSE)
M.heal_organ_damage(10, 10, updating_health = FALSE)
update_flags |= M.adjustOxyLoss(-10, FALSE)
update_flags |= M.adjustToxLoss(-10, FALSE)
return ..() | update_flags
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
if((NEARSIGHTED in owner.mutations) || (BLINDNESS in owner.mutations))
update_flags |= owner.CureNearsighted()
update_flags |= owner.CureBlind()
update_flags |= owner.SetEyeBlind(0)
owner.SetEyeBlind(0)

return ..() | update_flags

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@
// bitten once, die very slowly. Easy to survive a single bite - just go to medbay.
// total damage: 1/tick, human health 150 until crit, = 150 ticks, = 300 seconds = 5 minutes to get to medbay.
update_flags |= M.adjustToxLoss(1, FALSE)
update_flags |= M.EyeBlurry(6 SECONDS, FALSE)
M.EyeBlurry(6 SECONDS)
else if(volume < 60)
// bitten twice, die slowly. Get to medbay.
// total damage: 2/tick, human health 150 until crit, = 75 ticks, = 150 seconds = 2.5 minutes to get some medical treatment.
update_flags |= M.adjustToxLoss(2, FALSE)
update_flags |= M.EyeBlurry(6 SECONDS, FALSE)
M.EyeBlurry(6 SECONDS)
else if(volume < 90)
// bitten thrice, die quickly, severe muscle cramps make movement very difficult. Even calling for help probably won't save you.
// total damage: 4, human health 150 until crit, = 37.5 ticks, = 75s = 1m15s until death
update_flags |= M.adjustToxLoss(4, FALSE)
update_flags |= M.EyeBlurry(12 SECONDS, FALSE)
M.EyeBlurry(12 SECONDS)
M.Confused(12 SECONDS)
else
// bitten 4 or more times, whole body goes into shock/death
// total damage: 8, human health 150 until crit, = 18.75 ticks, = 37s until death
update_flags |= M.adjustToxLoss(8, FALSE)
update_flags |= M.EyeBlurry(12 SECONDS, FALSE)
M.EyeBlurry(12 SECONDS)
M.Paralyse(10 SECONDS)
return ..() | update_flags

Expand Down
18 changes: 8 additions & 10 deletions code/modules/reagents/chemistry/reagents/alcohol.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@
if(prob(50))
to_chat(M, "<span class='danger'>Your throat burns terribly!</span>")
M.emote(pick("scream","cry","choke","gasp"))
M.Stun(2 SECONDS, FALSE)
M.Stun(2 SECONDS)
if(prob(8))
to_chat(M, "<span class='danger'>Why!? WHY!?</span>")
if(prob(8))
Expand Down Expand Up @@ -2192,9 +2192,8 @@
taste_description = "faith in fairies"

/datum/reagent/consumable/ethanol/green_fairy/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
update_flags |= M.SetDruggy(min(max(0, M.AmountDruggy() + 10 SECONDS), 15 SECONDS))
return ..() | update_flags
M.SetDruggy(min(max(0, M.AmountDruggy() + 10 SECONDS), 15 SECONDS))
return ..()

/datum/reagent/consumable/ethanol/home_lebovsky
name = "Home Lebowski"
Expand Down Expand Up @@ -2305,8 +2304,7 @@
taste_description = "the blue set-up"

/datum/reagent/consumable/ethanol/blue_moondrin/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
update_flags |= M.Druggy(30 SECONDS, FALSE)
M.Druggy(30 SECONDS, FALSE)
switch(current_cycle)
if(1 to 15)
M.Dizzy(10 SECONDS)
Expand All @@ -2327,7 +2325,7 @@
M.Jitter(20 SECONDS)
M.AdjustHallucinate(30 SECONDS)
M.emote("moan")
return ..() | update_flags
return ..()

/datum/reagent/consumable/ethanol/red_moondrin
name = "Redwater Moon'drin"
Expand All @@ -2343,7 +2341,7 @@

/datum/reagent/consumable/ethanol/red_moondrin/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
update_flags |= M.Druggy(30, FALSE)
M.Druggy(30 SECONDS)
switch(current_cycle)
if(1 to 20)
M.Dizzy(20 SECONDS)
Expand Down Expand Up @@ -2394,15 +2392,15 @@
to_chat(M, "<span class='warning'>You can't breathe! But it feels GOOD!</span>")
update_flags |= M.adjustOxyLoss(15, FALSE)
update_flags |= M.adjustToxLoss(2, FALSE)
M.Stun(2 SECONDS, FALSE)
M.Stun(2 SECONDS)
if(prob(3))
M.playsound_local(src, 'sound/effects/heartbeat.ogg', 2)
to_chat(M, "<span class='warning'>You feel like you're being watched!</span>")
M.playsound_local(src,'sound/hallucinations/growl2.ogg', 1)
M.emote(pick("drool","scream"))
M.Jitter(20 SECONDS)
update_flags |= M.adjustToxLoss(3, FALSE)
M.Weaken(2 SECONDS, FALSE)
M.Weaken(2 SECONDS)
M.AdjustConfused(66 SECONDS)
return ..() | update_flags

Expand Down
20 changes: 10 additions & 10 deletions code/modules/reagents/chemistry/reagents/drugs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
to_chat(M, "<span class='warning'>You can't breathe!</span>")
update_flags |= M.adjustOxyLoss(15, FALSE)
update_flags |= M.adjustToxLoss(3, FALSE)
M.Stun(2 SECONDS, FALSE)
M.Stun(2 SECONDS)
else if(effect <= 4)
to_chat(M, "<span class='warning'>You feel terrible!</span>")
M.emote("drool")
Expand Down Expand Up @@ -179,7 +179,7 @@
if(36 to 70)
M.Drowsy(20 SECONDS)
if(71 to INFINITY)
M.Paralyse(20 SECONDS, FALSE)
M.Paralyse(20 SECONDS)
M.Drowsy(20 SECONDS)
return ..() | update_flags

Expand Down Expand Up @@ -270,7 +270,7 @@
M.bodytemperature += rand(5,30)
update_flags |= M.adjustBrainLoss(1, FALSE)
update_flags |= M.adjustToxLoss(1, FALSE)
M.Stun(4 SECONDS, FALSE)
M.Stun(4 SECONDS)
else if(effect <= 7)
M.Jitter(60 SECONDS)
M.emote("grumble")
Expand All @@ -279,7 +279,7 @@
M.visible_message("<span class='warning'>[M] is sweating like a pig!</span>")
M.bodytemperature += rand(20,100)
update_flags |= M.adjustToxLoss(5, FALSE)
M.Stun(6 SECONDS, FALSE)
M.Stun(6 SECONDS)
else if(effect <= 4)
M.visible_message("<span class='warning'>[M] starts tweaking the hell out!</span>")
M.Jitter(200 SECONDS)
Expand Down Expand Up @@ -323,7 +323,7 @@
if(prob(5))
to_chat(M, "<span class='notice'>You feel too chill!</span>")
M.emote(pick("yawn", "drool"))
M.Stun(2 SECONDS, FALSE)
M.Stun(2 SECONDS)
update_flags |= M.adjustToxLoss(1, FALSE)
update_flags |= M.adjustBrainLoss(1, FALSE)
M.bodytemperature -= 20
Expand Down Expand Up @@ -794,8 +794,8 @@
if(40 to 49)
M.say(pick(list("УАААААХАХАХ!", "КХХХААААААААА!", "АХАХАХАХ ААААА АХАХАХАХА!")))
if(50 to 55)
update_flags |= M.Weaken(4 SECONDS)
update_flags |= M.Jitter(10 SECONDS)
M.Weaken(4 SECONDS)
M.Jitter(10 SECONDS)
M.emote(pick("laugh"))
if(60 to 69)
M.bodytemperature += rand(1, 5)
Expand Down Expand Up @@ -840,10 +840,10 @@
to_chat(M, "<span class='notice'>You can't stop thinking about [name]...</span>")
if(51 to 100)
M.emote(pick("whimper", "glare", "cry", "sniff"))
update_flags |= M.Jitter(10 SECONDS)
M.Jitter(10 SECONDS)
if(101 to 150)
to_chat(M, "<span class='warning'>Your life has lost all colours</span>")
update_flags |= M.EyeBlind(16 SECONDS)
M.EyeBlind(16 SECONDS)
update_flags |= M.adjustBrainLoss(rand(1, 7))
if(151 to 200)
to_chat(M, "<span class='warning'>Your stomach lurches painfully!</span>")
Expand Down Expand Up @@ -1137,7 +1137,7 @@
var/update_flags = STATUS_UPDATE_NONE
if(prob(50))
update_flags |= M.adjustHeartLoss(1, FALSE)
update_flags |= M.AdjustConfused(2 SECONDS)
M.AdjustConfused(2 SECONDS)
if(prob(25))
M.emote("sneeze")
if(prob(10))
Expand Down
14 changes: 6 additions & 8 deletions code/modules/reagents/chemistry/reagents/medicine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -662,22 +662,21 @@
taste_description = "clarity"

/datum/reagent/medicine/oculine/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
if(prob(80))
if(iscarbon(M))
var/mob/living/carbon/C = M
var/obj/item/organ/internal/eyes/eyes = C.get_int_organ(/obj/item/organ/internal/eyes)
if(eyes && !eyes.is_dead())
eyes.heal_internal_damage(1)
update_flags |= M.AdjustEyeBlurry(-2 SECONDS)
M.AdjustEyeBlurry(-2 SECONDS)
var/obj/item/organ/internal/ears/ears = C.get_int_organ(/obj/item/organ/internal/ears)
if(ears && !ears.is_dead())
ears.heal_internal_damage(1)
if(ears.damage < 25 && prob(30))
C.SetDeaf(0)
else
update_flags |= M.AdjustEyeBlurry(-2 SECONDS)
return ..() | update_flags
M.AdjustEyeBlurry(-2 SECONDS)
return ..()

/datum/reagent/medicine/atropine
name = "Atropine"
Expand Down Expand Up @@ -854,10 +853,9 @@
taste_description = "sanity"

/datum/reagent/medicine/fomepizole/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
update_flags |= M.AdjustDizzy(-120 SECONDS, FALSE)
update_flags |= M.AdjustJitter(-20 SECONDS, FALSE)
return ..() | update_flags
M.AdjustDizzy(-120 SECONDS)
M.AdjustJitter(-20 SECONDS)
return ..()

/datum/reagent/medicine/mutadone
name = "Mutadone"
Expand Down
6 changes: 3 additions & 3 deletions code/modules/reagents/chemistry/reagents/ninja.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@
update_flags |= our_mob.adjustBrainLoss(-5, FALSE)
update_flags |= our_mob.adjustCloneLoss(-5, FALSE)
//Other helpfull things
update_flags |= our_mob.AdjustLoseBreath(-10 SECONDS, bound_lower = 10 SECONDS)
update_flags |= our_mob.AdjustParalysis(-2 SECONDS, FALSE)
update_flags |= our_mob.AdjustWeakened(-2 SECONDS)
our_mob.AdjustLoseBreath(-10 SECONDS, bound_lower = 10 SECONDS)
our_mob.AdjustParalysis(-2 SECONDS)
our_mob.AdjustWeakened(-2 SECONDS)
if(20 to 40)
//Human only effects
if(ishuman(our_mob))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/surgery/organs/eyes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,5 @@
var/obj/item/organ/internal/eyes/E = C.get_int_organ(/obj/item/organ/internal/eyes)
if(istype(E))
E.heal_internal_damage(G.heal_rate)
update_flags |= owner.AdjustEyeBlurry(-2 SECONDS)
owner.AdjustEyeBlurry(-2 SECONDS)
return ..() | update_flags

0 comments on commit 4aa64f1

Please sign in to comment.