From 02841f8e92d84ef5e76da032b87adc973a26a66b Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Wed, 15 Jan 2020 18:49:37 -0700 Subject: [PATCH] compile --- code/datums/brain_damage/special.dm | 2 +- code/datums/components/butchering.dm | 2 +- code/datums/components/chasm.dm | 3 +- code/datums/martial/sleeping_carp.dm | 2 +- code/datums/status_effects/buffs.dm | 6 +- code/game/objects/buckling.dm | 2 +- code/game/objects/effects/step_triggers.dm | 2 +- code/game/objects/items/holy_weapons.dm | 2 +- .../components/unary_devices/cryo.dm | 2 +- .../modules/clothing/spacesuits/chronosuit.dm | 2 +- .../mob/living/carbon/human/species.dm | 6 +- code/modules/mob/living/living.dm | 8 -- code/modules/mob/living/status_procs.dm | 3 + code/modules/photography/photos/photo.dm | 8 +- .../chemistry/reagents/medicine_reagents.dm | 107 +++++++++--------- .../chemistry/reagents/other_reagents.dm | 59 +++++----- .../nanites/nanite_programs/buffing.dm | 9 +- .../code/game/objects/cit_screenshake.dm | 2 +- 18 files changed, 109 insertions(+), 118 deletions(-) diff --git a/code/datums/brain_damage/special.dm b/code/datums/brain_damage/special.dm index b52c7d391c..bc1f566f23 100644 --- a/code/datums/brain_damage/special.dm +++ b/code/datums/brain_damage/special.dm @@ -13,7 +13,7 @@ /datum/brain_trauma/special/godwoken/on_life() ..() if(prob(4)) - if(prob(33) && (owner.IsStun() || owner.IsKnockdown() || owner.IsUnconscious())) + if(prob(33) && owner.HighestImmobilityAmount()) speak("unstun", TRUE) else if(prob(60) && owner.health <= owner.crit_threshold) speak("heal", TRUE) diff --git a/code/datums/components/butchering.dm b/code/datums/components/butchering.dm index 06169f64bf..3d5aa5261a 100644 --- a/code/datums/components/butchering.dm +++ b/code/datums/components/butchering.dm @@ -32,7 +32,7 @@ if(ishuman(M) && source.force && source.get_sharpness()) var/mob/living/carbon/human/H = M - if((H.health <= H.crit_threshold || (user.pulling == H && user.grab_state >= GRAB_NECK) || H.IsSleeping()) && user.zone_selected == BODY_ZONE_PRECISE_MOUTH) // Only sleeping, neck grabbed, or crit, can be sliced. + if((H.health <= H.crit_threshold || (user.pulling == H && user.grab_state >= GRAB_NECK) || H._REFACTORING_IsSleeping()) && user.zone_selected == BODY_ZONE_PRECISE_MOUTH) // Only sleeping, neck grabbed, or crit, can be sliced. if(H.has_status_effect(/datum/status_effect/neck_slice)) user.show_message("[H]'s neck has already been already cut, you can't make the bleeding any worse!", 1, \ "Their neck has already been already cut, you can't make the bleeding any worse!") diff --git a/code/datums/components/chasm.dm b/code/datums/components/chasm.dm index d606478a6a..c792cb4be9 100644 --- a/code/datums/components/chasm.dm +++ b/code/datums/components/chasm.dm @@ -110,8 +110,7 @@ if (isliving(AM)) var/mob/living/L = AM L.notransform = TRUE - L.Stun(200) - L.resting = TRUE + L.Paralyze(200) var/oldtransform = AM.transform var/oldcolor = AM.color diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm index aab99fcc4d..9aab8b7c47 100644 --- a/code/datums/martial/sleeping_carp.dm +++ b/code/datums/martial/sleeping_carp.dm @@ -81,7 +81,7 @@ return basic_hit(A,D) /datum/martial_art/the_sleeping_carp/proc/headKick(mob/living/carbon/human/A, mob/living/carbon/human/D) - if(CHECK_MOBILITY(D, MOBILTIY_STAND)) + if(CHECK_MOBILITY(D, MOBILITY_STAND)) log_combat(A, D, "head kicked (Sleeping Carp)") A.do_attack_animation(D, ATTACK_EFFECT_KICK) D.visible_message("[A] kicks [D] in the head!", \ diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm index ee6d9e2759..43afcdd807 100644 --- a/code/datums/status_effects/buffs.dm +++ b/code/datums/status_effects/buffs.dm @@ -73,8 +73,7 @@ owner.log_message("gained Vanguard stun immunity", LOG_ATTACK) owner.add_stun_absorption("vanguard", INFINITY, 1, "'s yellow aura momentarily intensifies!", "Your ward absorbs the stun!", " radiating with a soft yellow light!") owner.visible_message("[owner] begins to faintly glow!", "You will absorb all stuns for the next twenty seconds.") - owner.SetStun(0, FALSE) - owner.SetKnockdown(0) + owner.SetAllImmobility(0, FALSE) owner.setStaminaLoss(0, FALSE) progbar = new(owner, duration, owner) progbar.bar.color = list("#FAE48C", "#FAE48C", "#FAE48C", rgb(0,0,0)) @@ -226,9 +225,8 @@ return ..() /datum/status_effect/wish_granters_gift/on_remove() - owner.revive(full_heal = 1, admin_revive = 1) + owner.revive(full_heal = TRUE, admin_revive = TRUE) owner.visible_message("[owner] appears to wake from the dead, having healed all wounds!", "You have regenerated.") - owner.update_canmove() /obj/screen/alert/status_effect/wish_granters_gift name = "Wish Granter's Immortality" diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 416644cada..1f2df63690 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -85,7 +85,7 @@ . = buckled_mob buckled_mob.buckled = null buckled_mob.anchored = initial(buckled_mob.anchored) - buckled_mob.update_canmove() + buckled_mob.update_mobility() buckled_mob.clear_alert("buckled") buckled_mobs -= buckled_mob SEND_SIGNAL(src, COMSIG_MOVABLE_UNBUCKLE, buckled_mob, force) diff --git a/code/game/objects/effects/step_triggers.dm b/code/game/objects/effects/step_triggers.dm index b4c3345146..74ee4fa9ef 100644 --- a/code/game/objects/effects/step_triggers.dm +++ b/code/game/objects/effects/step_triggers.dm @@ -99,7 +99,7 @@ affecting.Remove(AM) - if(living(AM)) + if(isliving(AM)) var/mob/living/M = AM if(immobilize) REMOVE_TRAIT(M, TRAIT_MOBILITY_NOMOVE, src) diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm index 151a0c4bf1..1899c18aca 100644 --- a/code/game/objects/items/holy_weapons.dm +++ b/code/game/objects/items/holy_weapons.dm @@ -64,7 +64,7 @@ else playsound(src, 'sound/machines/buzz-sigh.ogg', 40, 1) -/obj/item/holybeacon/proc/beacon_armor(mob/M) +/obj/item/holybeacon/proc/beacon_armor(mob/living/M) var/list/holy_armor_list = typesof(/obj/item/storage/box/holy) var/list/display_names = list() for(var/V in holy_armor_list) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 9046d2ff28..41c9c0875c 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -239,7 +239,7 @@ M.forceMove(get_turf(src)) if(isliving(M)) var/mob/living/L = M - L.update_canmove() + L.update_mobility() occupant = null update_icon() diff --git a/code/modules/clothing/spacesuits/chronosuit.dm b/code/modules/clothing/spacesuits/chronosuit.dm index 2a5960086b..542a9d642d 100644 --- a/code/modules/clothing/spacesuits/chronosuit.dm +++ b/code/modules/clothing/spacesuits/chronosuit.dm @@ -87,7 +87,7 @@ if(istype(user)) if(to_turf) user.forceMove(to_turf) - user.SetStun(0) + user._REFACTORING_SetStun(0) user.next_move = 1 user.alpha = 255 user.update_atom_colour() diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 2324fe4b99..068e041450 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1839,7 +1839,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) if(user.getStaminaLoss() >= STAMINA_SOFTCRIT) to_chat(user, "You're too exhausted for that.") return - if(!user.resting) + if(CHECK_MOBILITY(user, MOBILITY_STAND)) to_chat(user, "You can only force yourself up if you're on the ground.") return user.visible_message("[user] forces [p_them()]self up to [p_their()] feet!", "You force yourself up to your feet!") @@ -1857,7 +1857,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) return FALSE if(attacker_style && attacker_style.disarm_act(user,target)) return TRUE - if(user.resting) + if(!CHECK_MOBILITY(user, MOBILITY_STAND)) return FALSE else if(user == target) @@ -1870,7 +1870,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) target.w_uniform.add_fingerprint(user) SEND_SIGNAL(target, COMSIG_HUMAN_DISARM_HIT, user, user.zone_selected) - if(!target.resting) + if(CHECK_MOBILITY(target, MOBILITY_STAND)) target.adjustStaminaLoss(5) if(target.is_shove_knockdown_blocked()) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index d27e4ad644..0b2d2167bf 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1150,14 +1150,6 @@ GLOB.dead_mob_list += src . = ..() switch(var_name) - if("knockdown") - SetKnockdown(var_value) - if("stun") - SetStun(var_value) - if("unconscious") - SetUnconscious(var_value) - if("sleeping") - SetSleeping(var_value) if("eye_blind") set_blindness(var_value) if("eye_damage") diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index b63e766418..608db74204 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -330,6 +330,9 @@ if(updating) update_mobility() +/mob/living/proc/HighestImmobilityAmount() + return max(max(max(max(_REFACTORING_AmountStun(), _REFACTORING_AmountKnockdown()), AmountParalyzed()), AmountImmobilized()), AmountDazed()) + //////////////////UNCONSCIOUS /mob/living/proc/_REFACTORING_IsUnconscious() //If we're unconscious return has_status_effect(STATUS_EFFECT_UNCONSCIOUS) diff --git a/code/modules/photography/photos/photo.dm b/code/modules/photography/photos/photo.dm index 5682c333c7..37308ab978 100644 --- a/code/modules/photography/photos/photo.dm +++ b/code/modules/photography/photos/photo.dm @@ -85,8 +85,10 @@ set category = "Object" set src in usr + var/mob/living/L = usr + if(!istype(L)) + return var/n_name = copytext(sanitize(input(usr, "What would you like to label the photo?", "Photo Labelling", null) as text), 1, MAX_NAME_LEN) - //loc.loc check is for making possible renaming photos in clipboards - if((loc == usr || loc.loc && loc.loc == usr) && usr.stat == CONSCIOUS && usr.canmove && !usr.restrained()) + if(L.CanReach(src) && CHECK_MOBILITY(L, MOBILITY_USE)) name = "photo[(n_name ? text("- '[n_name]'") : null)]" - add_fingerprint(usr) + add_fingerprint(usr) diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index 7a3d651fac..b02d507b5e 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -1024,21 +1024,20 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) /datum/reagent/medicine/stimulants/on_mob_life(mob/living/carbon/M) if(M.health < 50 && M.health > 0) - M.adjustOxyLoss(-1*REM, 0) - M.adjustToxLoss(-1*REM, 0) - M.adjustBruteLoss(-1*REM, 0) - M.adjustFireLoss(-1*REM, 0) - M.AdjustStun(-60, 0) - M.AdjustKnockdown(-60, 0) - M.AdjustUnconscious(-60, 0) - M.adjustStaminaLoss(-20*REM, 0) + M.adjustOxyLoss(-1*REM, FALSE) + M.adjustToxLoss(-1*REM, FALSE) + M.adjustBruteLoss(-1*REM, FALSE) + M.adjustFireLoss(-1*REM, FALSE) + M.AdjustAllImmobility(-60, FALSE) + M.AdjustUnconscious(-60, FALSE) + M.adjustStaminaLoss(-20*REM, FALSE) ..() . = 1 /datum/reagent/medicine/stimulants/overdose_process(mob/living/M) if(prob(33)) - M.adjustStaminaLoss(2.5*REM, 0) - M.adjustToxLoss(1*REM, 0) + M.adjustStaminaLoss(2.5*REM, FALSE) + M.adjustToxLoss(1*REM, FALSE) M.losebreath++ . = 1 ..() @@ -1069,12 +1068,12 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) pH = 5 /datum/reagent/medicine/bicaridine/on_mob_life(mob/living/carbon/M) - M.adjustBruteLoss(-2*REM, 0) + M.adjustBruteLoss(-2*REM, FALSE) ..() . = 1 /datum/reagent/medicine/bicaridine/overdose_process(mob/living/M) - M.adjustBruteLoss(4*REM, 0) + M.adjustBruteLoss(4*REM, FALSE) ..() . = 1 @@ -1088,12 +1087,12 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) pH = 9.7 /datum/reagent/medicine/dexalin/on_mob_life(mob/living/carbon/M) - M.adjustOxyLoss(-2*REM, 0) + M.adjustOxyLoss(-2*REM, FALSE) ..() . = 1 /datum/reagent/medicine/dexalin/overdose_process(mob/living/M) - M.adjustOxyLoss(4*REM, 0) + M.adjustOxyLoss(4*REM, FALSE) ..() . = 1 @@ -1107,12 +1106,12 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) pH = 9 /datum/reagent/medicine/kelotane/on_mob_life(mob/living/carbon/M) - M.adjustFireLoss(-2*REM, 0) + M.adjustFireLoss(-2*REM, FALSE) ..() . = 1 /datum/reagent/medicine/kelotane/overdose_process(mob/living/M) - M.adjustFireLoss(4*REM, 0) + M.adjustFireLoss(4*REM, FALSE) ..() . = 1 @@ -1127,14 +1126,14 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) pH = 10 /datum/reagent/medicine/antitoxin/on_mob_life(mob/living/carbon/M) - M.adjustToxLoss(-2*REM, 0) + M.adjustToxLoss(-2*REM, FALSE) for(var/datum/reagent/toxin/R in M.reagents.reagent_list) M.reagents.remove_reagent(R.id,1) ..() . = 1 /datum/reagent/medicine/antitoxin/overdose_process(mob/living/M) - M.adjustToxLoss(4*REM, 0) // End result is 2 toxin loss taken, because it heals 2 and then removes 4. + M.adjustToxLoss(4*REM, FALSE) // End result is 2 toxin loss taken, because it heals 2 and then removes 4. ..() . = 1 @@ -1162,18 +1161,18 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) /datum/reagent/medicine/tricordrazine/on_mob_life(mob/living/carbon/M) if(prob(80)) - M.adjustBruteLoss(-1*REM, 0) - M.adjustFireLoss(-1*REM, 0) - M.adjustOxyLoss(-1*REM, 0) - M.adjustToxLoss(-1*REM, 0) + M.adjustBruteLoss(-1*REM, FALSE) + M.adjustFireLoss(-1*REM, FALSE) + M.adjustOxyLoss(-1*REM, FALSE) + M.adjustToxLoss(-1*REM, FALSE) . = 1 ..() /datum/reagent/medicine/tricordrazine/overdose_process(mob/living/M) - M.adjustToxLoss(2*REM, 0) - M.adjustOxyLoss(2*REM, 0) - M.adjustBruteLoss(2*REM, 0) - M.adjustFireLoss(2*REM, 0) + M.adjustToxLoss(2*REM, FALSE) + M.adjustOxyLoss(2*REM, FALSE) + M.adjustBruteLoss(2*REM, FALSE) + M.adjustFireLoss(2*REM, FALSE) ..() . = 1 @@ -1186,9 +1185,9 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) taste_description = "jelly" /datum/reagent/medicine/regen_jelly/on_mob_life(mob/living/carbon/M) - M.adjustBruteLoss(-1.5*REM, 0) - M.adjustFireLoss(-1.5*REM, 0) - M.adjustOxyLoss(-1.5*REM, 0) + M.adjustBruteLoss(-1.5*REM, FALSE) + M.adjustFireLoss(-1.5*REM, FALSE) + M.adjustOxyLoss(-1.5*REM, FALSE) M.adjustToxLoss(-1.5*REM, 0, TRUE) //heals TOXINLOVERs . = 1 ..() @@ -1202,13 +1201,13 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) pH = 11 /datum/reagent/medicine/syndicate_nanites/on_mob_life(mob/living/carbon/M) - M.adjustBruteLoss(-5*REM, 0) //A ton of healing - this is a 50 telecrystal investment. - M.adjustFireLoss(-5*REM, 0) - M.adjustOxyLoss(-15, 0) - M.adjustToxLoss(-5*REM, 0) + M.adjustBruteLoss(-5*REM, FALSE) //A ton of healing - this is a 50 telecrystal investment. + M.adjustFireLoss(-5*REM, FALSE) + M.adjustOxyLoss(-15, FALSE) + M.adjustToxLoss(-5*REM, FALSE) M.adjustOrganLoss(ORGAN_SLOT_BRAIN, -15*REM) - M.adjustCloneLoss(-3*REM, 0) - M.adjustStaminaLoss(-25*REM,0) + M.adjustCloneLoss(-3*REM, FALSE) + M.adjustStaminaLoss(-25*REM,FALSE) if(M.blood_volume < (BLOOD_VOLUME_NORMAL*M.blood_ratio)) M.blood_volume += 40 // blood fall out man bad ..() @@ -1223,13 +1222,13 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) pH = 11 /datum/reagent/medicine/lesser_syndicate_nanites/on_mob_life(mob/living/carbon/M) - M.adjustBruteLoss(-3*REM, 0) // hidden gold shh - M.adjustFireLoss(-3*REM, 0) - M.adjustOxyLoss(-15, 0) - M.adjustToxLoss(-3*REM, 0) + M.adjustBruteLoss(-3*REM, FALSE) // hidden gold shh + M.adjustFireLoss(-3*REM, FALSE) + M.adjustOxyLoss(-15, FALSE) + M.adjustToxLoss(-3*REM, FALSE) M.adjustOrganLoss(ORGAN_SLOT_BRAIN, -15*REM) - M.adjustCloneLoss(-3*REM, 0) - M.adjustStaminaLoss(-20*REM,0) + M.adjustCloneLoss(-3*REM, FALSE) + M.adjustStaminaLoss(-20*REM,FALSE) if(M.blood_volume < (BLOOD_VOLUME_NORMAL*M.blood_ratio)) M.blood_volume += 20 // blood fall out man bad ..() @@ -1247,17 +1246,17 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) pH = 11.8 /datum/reagent/medicine/neo_jelly/on_mob_life(mob/living/carbon/M) - M.adjustBruteLoss(-1.5*REM, 0) - M.adjustFireLoss(-1.5*REM, 0) - M.adjustOxyLoss(-1.5*REM, 0) + M.adjustBruteLoss(-1.5*REM, FALSE) + M.adjustFireLoss(-1.5*REM, FALSE) + M.adjustOxyLoss(-1.5*REM, FALSE) M.adjustToxLoss(-1.5*REM, 0, TRUE) //heals TOXINLOVERs . = 1 ..() /datum/reagent/medicine/neo_jelly/overdose_process(mob/living/M) - M.adjustOxyLoss(2.6*REM, 0) - M.adjustBruteLoss(3.5*REM, 0) - M.adjustFireLoss(3.5*REM, 0) + M.adjustOxyLoss(2.6*REM, FALSE) + M.adjustBruteLoss(3.5*REM, FALSE) + M.adjustFireLoss(3.5*REM, FALSE) ..() . = 1 @@ -1270,13 +1269,13 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) pH = 11 /datum/reagent/medicine/earthsblood/on_mob_life(mob/living/carbon/M) - M.adjustBruteLoss(-3 * REM, 0) - M.adjustFireLoss(-3 * REM, 0) - M.adjustOxyLoss(-15 * REM, 0) - M.adjustToxLoss(-3 * REM, 0, TRUE) //Heals TOXINLOVERS + M.adjustBruteLoss(-3 * REM, FALSE) + M.adjustFireLoss(-3 * REM, FALSE) + M.adjustOxyLoss(-15 * REM, FALSE) + M.adjustToxLoss(-3 * REM, FALSE, TRUE) //Heals TOXINLOVERS M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2 * REM, 150) //This does, after all, come from ambrosia, and the most powerful ambrosia in existence, at that! - M.adjustCloneLoss(-1 * REM, 0) - M.adjustStaminaLoss(-13 * REM, 0) + M.adjustCloneLoss(-1 * REM, FALSE) + M.adjustStaminaLoss(-13 * REM, FALSE) M.jitteriness = min(max(0, M.jitteriness + 3), 30) M.druggy = min(max(0, M.druggy + 10), 15) //See above ..() @@ -1284,7 +1283,7 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) /datum/reagent/medicine/earthsblood/overdose_process(mob/living/M) M.hallucination = min(max(0, M.hallucination + 5), 60) - M.adjustToxLoss(8 * REM, 0, TRUE) //Hurts TOXINLOVERS + M.adjustToxLoss(8 * REM, FALSE, TRUE) //Hurts TOXINLOVERS ..() . = 1 diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 550b9490fc..ad23ab2d1b 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -421,22 +421,21 @@ /datum/reagent/fuel/unholywater/on_mob_life(mob/living/carbon/M) if(iscultist(M)) M.drowsyness = max(M.drowsyness-5, 0) - M.AdjustUnconscious(-20, 0) - M.AdjustStun(-40, 0) - M.AdjustKnockdown(-40, 0) - M.adjustStaminaLoss(-10, 0) - M.adjustToxLoss(-2, 0, TRUE) - M.adjustOxyLoss(-2, 0) - M.adjustBruteLoss(-2, 0) - M.adjustFireLoss(-2, 0) + M.AdjustUnconscious(-20, FALSE) + M.AdjustAllImmobility(-40, FALSE) + M.adjustStaminaLoss(-10, FALSE) + M.adjustToxLoss(-2, FALSE, TRUE) + M.adjustOxyLoss(-2, FALSE) + M.adjustBruteLoss(-2, FALSE) + M.adjustFireLoss(-2, FALSE) if(ishuman(M) && M.blood_volume < (BLOOD_VOLUME_NORMAL*M.blood_ratio)) M.blood_volume += 3 else // Will deal about 90 damage when 50 units are thrown M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3, 150) - M.adjustToxLoss(2, 0) - M.adjustFireLoss(2, 0) - M.adjustOxyLoss(2, 0) - M.adjustBruteLoss(2, 0) + M.adjustToxLoss(2, FALSE) + M.adjustFireLoss(2, FALSE) + M.adjustOxyLoss(2, FALSE) + M.adjustBruteLoss(2, FALSE) holder.remove_reagent(id, 1) return TRUE @@ -449,8 +448,8 @@ /datum/reagent/hellwater/on_mob_life(mob/living/carbon/M) M.fire_stacks = min(5,M.fire_stacks + 3) M.IgniteMob() //Only problem with igniting people is currently the commonly availible fire suits make you immune to being on fire - M.adjustToxLoss(1, 0) - M.adjustFireLoss(1, 0) //Hence the other damages... ain't I a bastard? + M.adjustToxLoss(1, FALSE) + M.adjustFireLoss(1, FALSE) //Hence the other damages... ain't I a bastard? M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5, 150) holder.remove_reagent(id, 1) pH = 0.1 @@ -464,23 +463,23 @@ /datum/reagent/fuel/holyoil/on_mob_life(mob/living/carbon/M) if(is_servant_of_ratvar(M)) M.drowsyness = max(M.drowsyness-5, 0) - M.AdjustUnconscious(-60, 0) - M.AdjustStun(-30, 0) - M.AdjustKnockdown(-70, 0) - M.adjustStaminaLoss(-15, 0) - M.adjustToxLoss(-5, 0, TRUE) - M.adjustOxyLoss(-3, 0) - M.adjustBruteLoss(-3, 0) - M.adjustFireLoss(-5, 0) + M.AdjustUnconscious(-60, FALSE) + M.AdjustAllImmobility(-30, FALSE) + M._REFACTORING_AdjustKnockdown(-40, FALSE) + M.adjustStaminaLoss(-15, FALSE) + M.adjustToxLoss(-5, FALSE, TRUE) + M.adjustOxyLoss(-3, FALSE) + M.adjustBruteLoss(-3, FALSE) + M.adjustFireLoss(-5, FALSE) if(iscultist(M)) - M.AdjustUnconscious(1, 0) - M.AdjustStun(10, 0) - M.AdjustKnockdown(20, 0) - M.adjustStaminaLoss(15, 0) + M.AdjustUnconscious(1, FALSE) + M.AdjustAllImmobility(10, FALSE) + M._REFACTORING_AdjustKnockdown(10, FALSE) + M.adjustStaminaLoss(15, FALSE) else - M.adjustToxLoss(3, 0) - M.adjustOxyLoss(2, 0) - M.adjustStaminaLoss(10, 0) + M.adjustToxLoss(3, FALSE) + M.adjustOxyLoss(2, FALSE) + M.adjustStaminaLoss(10, FALSE) holder.remove_reagent(id, 1) return TRUE @@ -969,7 +968,7 @@ taste_mult = 0 // apparently tasteless. /datum/reagent/mercury/on_mob_life(mob/living/carbon/M) - if(M.canmove && !isspaceturf(M.loc)) + if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !isspaceturf(M.loc)) step(M, pick(GLOB.cardinals)) if(prob(5)) M.emote(pick("twitch","drool","moan")) diff --git a/code/modules/research/nanites/nanite_programs/buffing.dm b/code/modules/research/nanites/nanite_programs/buffing.dm index be12d06ede..2e8bcb6f32 100644 --- a/code/modules/research/nanites/nanite_programs/buffing.dm +++ b/code/modules/research/nanites/nanite_programs/buffing.dm @@ -29,12 +29,11 @@ if(!..()) return to_chat(host_mob, "You feel a sudden surge of energy!") - host_mob.SetStun(0) - host_mob.SetKnockdown(0) - host_mob.SetUnconscious(0) + host_mob.SetAllImmobility(0, FALSE) + host_mob.SetUnconscious(0, FALSE) host_mob.adjustStaminaLoss(-10) //stimulants give stamina heal now - host_mob.lying = 0 - host_mob.update_canmove() + host_mob.set_resting(FALSE, TRUE, FALSE) + host_mob.update_mobility() host_mob.reagents.add_reagent("stimulants", 1.5) /datum/nanite_program/hardening diff --git a/modular_citadel/code/game/objects/cit_screenshake.dm b/modular_citadel/code/game/objects/cit_screenshake.dm index 5bb1f82c10..ddb417e06e 100644 --- a/modular_citadel/code/game/objects/cit_screenshake.dm +++ b/modular_citadel/code/game/objects/cit_screenshake.dm @@ -53,7 +53,7 @@ if (1) shake_camera(M, ((force - 10) * 0.015 + 1), ((force - 10) * 0.015)) if (2) - if (!M.canmove) + if(!CHECK_MOBILITY(M, MOBILITY_MOVE)) shake_camera(M, ((force - 10) * 0.015 + 1), ((force - 10) * 0.015)) /obj/item/attack_obj(obj/O, mob/living/user)