From 445d94f335a278cd22b67c08f95c4122dd963634 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Wed, 17 Jun 2020 21:32:10 -0700 Subject: [PATCH] haha whew --- code/__DEFINES/dcs/signals.dm | 4 + code/__DEFINES/spaceman_dmm.dm | 16 +++ code/_onclick/click.dm | 2 +- code/controllers/subsystem/npcpool.dm | 2 +- code/controllers/subsystem/ticker.dm | 4 +- code/datums/brain_damage/split_personality.dm | 6 +- code/datums/cinematic.dm | 10 +- code/datums/components/chasm.dm | 2 +- code/datums/diseases/transformation.dm | 4 +- .../objects/items/robot/robot_upgrades.dm | 4 +- .../antagonists/blob/blob/blobs/blob_mobs.dm | 70 ++++++------ .../bloodsucker/powers/mesmerize.dm | 4 +- .../bloodsucker/powers/trespass.dm | 6 +- .../changeling/powers/humanform.dm | 2 +- .../changeling/powers/lesserform.dm | 4 +- code/modules/antagonists/revenant/revenant.dm | 10 +- .../antagonists/wizard/equipment/artefact.dm | 2 +- .../modules/clothing/spacesuits/chronosuit.dm | 4 +- .../mining/lavaland/necropolis_chests.dm | 4 +- code/modules/mob/dead/dead.dm | 6 +- code/modules/mob/living/bloodcrawl.dm | 6 +- code/modules/mob/living/brain/life.dm | 8 +- .../mob/living/carbon/alien/larva/life.dm | 16 +-- code/modules/mob/living/carbon/alien/life.dm | 5 +- .../carbon/alien/special/alien_embryo.dm | 4 +- code/modules/mob/living/carbon/human/life.dm | 2 +- .../carbon/human/species_types/jellypeople.dm | 6 +- code/modules/mob/living/carbon/life.dm | 2 +- code/modules/mob/living/carbon/monkey/life.dm | 2 +- .../modules/mob/living/carbon/update_icons.dm | 2 +- code/modules/mob/living/life.dm | 103 +++++++++++------- code/modules/mob/living/silicon/robot/life.dm | 2 +- .../mob/living/silicon/robot/robot_modules.dm | 4 +- .../simple_animal/friendly/farm_animals.dm | 40 ++++--- .../living/simple_animal/friendly/plushie.dm | 4 +- .../mob/living/simple_animal/hostile/bear.dm | 2 +- .../mob/living/simple_animal/hostile/carp.dm | 5 +- .../living/simple_animal/hostile/hostile.dm | 7 +- .../living/simple_animal/hostile/illusion.dm | 7 +- .../simple_animal/hostile/jungle/leaper.dm | 13 ++- .../hostile/jungle/mega_arachnid.dm | 6 +- .../hostile/megafauna/bubblegum.dm | 5 +- .../hostile/megafauna/colossus.dm | 4 +- .../hostile/megafauna/hierophant.dm | 7 +- .../hostile/megafauna/swarmer.dm | 15 ++- .../mob/living/simple_animal/hostile/mimic.dm | 5 +- .../hostile/mining_mobs/basilisk.dm | 5 +- .../mining_mobs/elites/goliath_broodmother.dm | 5 +- .../hostile/mining_mobs/elites/pandora.dm | 5 +- .../hostile/mining_mobs/goliath.dm | 10 +- .../hostile/mining_mobs/hivelord.dm | 5 +- .../hostile/mining_mobs/ice_demon.dm | 7 +- .../hostile/mining_mobs/ice_whelp.dm | 7 +- .../hostile/mining_mobs/polarbear.dm | 7 +- .../simple_animal/hostile/mining_mobs/wolf.dm | 7 +- .../living/simple_animal/hostile/mushroom.dm | 5 +- .../simple_animal/hostile/netherworld.dm | 5 +- .../living/simple_animal/hostile/statue.dm | 5 +- .../mob/living/simple_animal/slime/life.dm | 22 ++-- code/modules/mob/mob.dm | 2 +- code/modules/mob/mob_defines.dm | 4 +- code/modules/mob/mob_movement.dm | 2 +- code/modules/mob/transform_procs.dm | 38 +++---- .../projectiles/guns/ballistic/launchers.dm | 4 +- code/modules/projectiles/projectile/magic.dm | 4 +- .../modules/ruins/lavalandruin_code/puzzle.dm | 6 +- .../ruins/spaceruin_code/hilbertshotel.dm | 4 +- code/modules/shuttle/shuttle.dm | 2 +- code/modules/spells/spell_types/devil.dm | 8 +- .../spells/spell_types/ethereal_jaunt.dm | 6 +- code/modules/spells/spell_types/rod_form.dm | 4 +- code/modules/spells/spell_types/shapeshift.dm | 4 +- 72 files changed, 341 insertions(+), 290 deletions(-) diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 141f5626b2..8a88f2dbb6 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -232,6 +232,10 @@ #define COMSIG_LIVING_STATUS_STAGGER "living_stagger" //from base of mob/living/Stagger() (amount, update, ignore) #define COMPONENT_NO_STUN 1 //For all of them +#define COMSIG_LIVING_LIFE "life_tick" //from base of mob/living/Life() (seconds, times_fired) + #define COMPONENT_INTERRUPT_LIFE_BIOLOGICAL 1 // interrupt biological processes + #define COMPONENT_INTERRUPT_LIFE_PHYSICAL 2 // interrupt physical handling + // /mob/living/carbon signals #define COMSIG_CARBON_SOUNDBANG "carbon_soundbang" //from base of mob/living/carbon/soundbang_act(): (list(intensity)) #define COMSIG_CARBON_IDENTITY_TRANSFERRED_TO "carbon_id_transferred_to" //from datum/dna/transfer_identity(): (datum/dna, transfer_SE) diff --git a/code/__DEFINES/spaceman_dmm.dm b/code/__DEFINES/spaceman_dmm.dm index b9c0544bc1..3d4207c5c9 100644 --- a/code/__DEFINES/spaceman_dmm.dm +++ b/code/__DEFINES/spaceman_dmm.dm @@ -6,10 +6,26 @@ #define RETURN_TYPE(X) set SpacemanDMM_return_type = X #define SHOULD_CALL_PARENT(X) set SpacemanDMM_should_call_parent = X #define UNLINT(X) SpacemanDMM_unlint(X) + #define SHOULD_NOT_OVERRIDE(X) set SpacemanDMM_should_not_override = X + #define SHOULD_NOT_SLEEP(X) set SpacemanDMM_should_not_sleep = X + #define SHOULD_BE_PURE(X) set SpacemanDMM_should_be_pure = X + #define PRIVATE_PROC(X) set SpacemanDMM_private_proc = X + #define PROTECTED_PROC(X) set SpacemanDMM_protected_proc = X + #define VAR_FINAL var/SpacemanDMM_final + #define VAR_PRIVATE var/SpacemanDMM_private + #define VAR_PROTECTED var/SpacemanDMM_protected #else #define RETURN_TYPE(X) #define SHOULD_CALL_PARENT(X) #define UNLINT(X) X + #define SHOULD_NOT_OVERRIDE(X) + #define SHOULD_NOT_SLEEP(X) + #define SHOULD_BE_PURE(X) + #define PRIVATE_PROC(X) + #define PROTECTED_PROC(X) + #define VAR_FINAL var + #define VAR_PRIVATE var + #define VAR_PROTECTED var #endif /world/proc/enable_debugger() diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index ecbcb6ec01..01261677d9 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -76,7 +76,7 @@ if(check_click_intercept(params,A)) return - if(notransform) + if(mob_transforming) return if(SEND_SIGNAL(src, COMSIG_MOB_CLICKON, A, params) & COMSIG_MOB_CANCEL_CLICKON) diff --git a/code/controllers/subsystem/npcpool.dm b/code/controllers/subsystem/npcpool.dm index 7fd3512448..2d2fbb0704 100644 --- a/code/controllers/subsystem/npcpool.dm +++ b/code/controllers/subsystem/npcpool.dm @@ -23,7 +23,7 @@ SUBSYSTEM_DEF(npcpool) var/mob/living/simple_animal/SA = currentrun[currentrun.len] --currentrun.len - if(!SA.ckey && !SA.notransform) + if(!SA.ckey && !SA.mob_transforming) if(SA.stat != DEAD) SA.handle_automated_movement() if(SA.stat != DEAD) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 8042631b7b..765f0c8382 100755 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -409,7 +409,7 @@ SUBSYSTEM_DEF(ticker) var/mob/living = player.transfer_character() if(living) qdel(player) - living.notransform = TRUE + living.mob_transforming = TRUE if(living.client) if (living.client.prefs && living.client.prefs.auto_ooc) if (living.client.prefs.chat_toggles & CHAT_OOC) @@ -423,7 +423,7 @@ SUBSYSTEM_DEF(ticker) /datum/controller/subsystem/ticker/proc/release_characters(list/livings) for(var/I in livings) var/mob/living/L = I - L.notransform = FALSE + L.mob_transforming = FALSE /datum/controller/subsystem/ticker/proc/send_tip_of_the_round() var/m diff --git a/code/datums/brain_damage/split_personality.dm b/code/datums/brain_damage/split_personality.dm index f5e00208c5..6b84e1362d 100644 --- a/code/datums/brain_damage/split_personality.dm +++ b/code/datums/brain_damage/split_personality.dm @@ -123,7 +123,9 @@ trauma = _trauma return ..() -/mob/living/split_personality/Life() +/mob/living/split_personality/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return if(QDELETED(body)) qdel(src) //in case trauma deletion doesn't already do it @@ -132,8 +134,6 @@ trauma.switch_personalities() qdel(trauma) - ..() - /mob/living/split_personality/Login() ..() to_chat(src, "As a split personality, you cannot do anything but observe. However, you will eventually gain control of your body, switching places with the current personality.") diff --git a/code/datums/cinematic.dm b/code/datums/cinematic.dm index e229b25258..df2c15e9c8 100644 --- a/code/datums/cinematic.dm +++ b/code/datums/cinematic.dm @@ -30,7 +30,7 @@ GLOBAL_LIST_EMPTY(cinematics) /datum/cinematic var/id = CINEMATIC_DEFAULT var/list/watching = list() //List of clients watching this - var/list/locked = list() //Who had notransform set during the cinematic + var/list/locked = list() //Who had mob_transforming set during the cinematic var/is_global = FALSE //Global cinematics will override mob-specific ones var/obj/screen/cinematic/screen var/datum/callback/special_callback //For special effects synced with animation (explosions after the countdown etc) @@ -45,7 +45,7 @@ GLOBAL_LIST_EMPTY(cinematics) GLOB.cinematics -= src QDEL_NULL(screen) for(var/mob/M in locked) - M.notransform = FALSE + M.mob_transforming = FALSE return ..() /datum/cinematic/proc/play(watchers) @@ -70,7 +70,7 @@ GLOBAL_LIST_EMPTY(cinematics) for(var/mob/M in GLOB.mob_list) if(M in watchers) - M.notransform = TRUE //Should this be done for non-global cinematics or even at all ? + M.mob_transforming = TRUE //Should this be done for non-global cinematics or even at all ? locked += M //Close watcher ui's SStgui.close_user_uis(M) @@ -79,7 +79,7 @@ GLOBAL_LIST_EMPTY(cinematics) M.client.screen += screen else if(is_global) - M.notransform = TRUE + M.mob_transforming = TRUE locked += M //Actually play it @@ -254,4 +254,4 @@ Nuke.Explosion() Narsie() -> Cinematic(CULT,world) -*/ \ No newline at end of file +*/ diff --git a/code/datums/components/chasm.dm b/code/datums/components/chasm.dm index c792cb4be9..0bb6c4a0af 100644 --- a/code/datums/components/chasm.dm +++ b/code/datums/components/chasm.dm @@ -109,7 +109,7 @@ AM.visible_message("[AM] falls into [parent]!", "[oblivion_message]") if (isliving(AM)) var/mob/living/L = AM - L.notransform = TRUE + L.mob_transforming = TRUE L.Paralyze(200) var/oldtransform = AM.transform diff --git a/code/datums/diseases/transformation.dm b/code/datums/diseases/transformation.dm index 1bb927aa12..d72dcbd362 100644 --- a/code/datums/diseases/transformation.dm +++ b/code/datums/diseases/transformation.dm @@ -52,9 +52,9 @@ to_chat(affected_mob, pick(stage5)) if(QDELETED(affected_mob)) return - if(affected_mob.notransform) + if(affected_mob.mob_transforming) return - affected_mob.notransform = 1 + affected_mob.mob_transforming = 1 for(var/obj/item/W in affected_mob.get_equipped_items(TRUE)) affected_mob.dropItemToGround(W) for(var/obj/item/I in affected_mob.held_items) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 08ce73109c..bf82ee1ea9 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -545,7 +545,7 @@ to_chat(usr, "This unit already has an expand module installed!") return FALSE - R.notransform = TRUE + R.mob_transforming = TRUE var/prev_locked_down = R.locked_down R.SetLockdown(1) R.anchored = TRUE @@ -559,7 +559,7 @@ if(!prev_locked_down) R.SetLockdown(0) R.anchored = FALSE - R.notransform = FALSE + R.mob_transforming = FALSE R.resize = 2 R.hasExpanded = TRUE R.update_transform() diff --git a/code/modules/antagonists/blob/blob/blobs/blob_mobs.dm b/code/modules/antagonists/blob/blob/blobs/blob_mobs.dm index 91fb538ca3..ba2363ecc0 100644 --- a/code/modules/antagonists/blob/blob/blobs/blob_mobs.dm +++ b/code/modules/antagonists/blob/blob/blobs/blob_mobs.dm @@ -103,7 +103,9 @@ factory.spores += src . = ..() -/mob/living/simple_animal/hostile/blob/blobspore/Life() +/mob/living/simple_animal/hostile/blob/blobspore/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return if(!is_zombie && isturf(src.loc)) for(var/mob/living/carbon/human/H in view(src,1)) //Only for corpse right next to/on same tile if(H.stat == DEAD) @@ -111,7 +113,6 @@ break if(factory && z != factory.z) death() - ..() /mob/living/simple_animal/hostile/blob/blobspore/proc/Zombify(mob/living/carbon/human/H) is_zombie = 1 @@ -233,39 +234,40 @@ return FALSE return ..() -/mob/living/simple_animal/hostile/blob/blobbernaut/Life() - if(..()) - var/list/blobs_in_area = range(2, src) - if(independent) - return // strong independent blobbernaut that don't need no blob - var/damagesources = 0 - if(!(locate(/obj/structure/blob) in blobs_in_area)) - damagesources++ - if(!factory) - damagesources++ - else - if(locate(/obj/structure/blob/core) in blobs_in_area) - adjustHealth(-maxHealth*0.1) - var/obj/effect/temp_visual/heal/H = new /obj/effect/temp_visual/heal(get_turf(src)) //hello yes you are being healed - if(overmind) - H.color = overmind.blobstrain.complementary_color - else - H.color = "#000000" - if(locate(/obj/structure/blob/node) in blobs_in_area) - adjustHealth(-maxHealth*0.05) - var/obj/effect/temp_visual/heal/H = new /obj/effect/temp_visual/heal(get_turf(src)) - if(overmind) - H.color = overmind.blobstrain.complementary_color - else - H.color = "#000000" - if(damagesources) - for(var/i in 1 to damagesources) - adjustHealth(maxHealth*0.025) //take 2.5% of max health as damage when not near the blob or if the naut has no factory, 5% if both - var/image/I = new('icons/mob/blob.dmi', src, "nautdamage", MOB_LAYER+0.01) - I.appearance_flags = RESET_COLOR +/mob/living/simple_animal/hostile/blob/blobbernaut/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return + var/list/blobs_in_area = range(2, src) + if(independent) + return // strong independent blobbernaut that don't need no blob + var/damagesources = 0 + if(!(locate(/obj/structure/blob) in blobs_in_area)) + damagesources++ + if(!factory) + damagesources++ + else + if(locate(/obj/structure/blob/core) in blobs_in_area) + adjustHealth(-maxHealth*0.1) + var/obj/effect/temp_visual/heal/H = new /obj/effect/temp_visual/heal(get_turf(src)) //hello yes you are being healed if(overmind) - I.color = overmind.blobstrain.complementary_color - flick_overlay_view(I, src, 8) + H.color = overmind.blobstrain.complementary_color + else + H.color = "#000000" + if(locate(/obj/structure/blob/node) in blobs_in_area) + adjustHealth(-maxHealth*0.05) + var/obj/effect/temp_visual/heal/H = new /obj/effect/temp_visual/heal(get_turf(src)) + if(overmind) + H.color = overmind.blobstrain.complementary_color + else + H.color = "#000000" + if(damagesources) + for(var/i in 1 to damagesources) + adjustHealth(maxHealth*0.025) //take 2.5% of max health as damage when not near the blob or if the naut has no factory, 5% if both + var/image/I = new('icons/mob/blob.dmi', src, "nautdamage", MOB_LAYER+0.01) + I.appearance_flags = RESET_COLOR + if(overmind) + I.color = overmind.blobstrain.complementary_color + flick_overlay_view(I, src, 8) /mob/living/simple_animal/hostile/blob/blobbernaut/adjustHealth(amount, updating_health = TRUE, forced = FALSE) . = ..() diff --git a/code/modules/antagonists/bloodsucker/powers/mesmerize.dm b/code/modules/antagonists/bloodsucker/powers/mesmerize.dm index eea80d52f3..fccef4fb0c 100644 --- a/code/modules/antagonists/bloodsucker/powers/mesmerize.dm +++ b/code/modules/antagonists/bloodsucker/powers/mesmerize.dm @@ -129,10 +129,10 @@ target.Stun(power_time) to_chat(L, "[target] is fixed in place by your hypnotic gaze.") target.next_move = world.time + power_time // <--- Use direct change instead. We want an unmodified delay to their next move // target.changeNext_move(power_time) // check click.dm - target.notransform = TRUE // <--- Fuck it. We tried using next_move, but they could STILL resist. We're just doing a hard freeze. + target.mob_transforming = TRUE // <--- Fuck it. We tried using next_move, but they could STILL resist. We're just doing a hard freeze. spawn(power_time) if(istype(target) && success) - target.notransform = FALSE + target.mob_transforming = FALSE if(istype(L) && target.stat == CONSCIOUS && (target in L.fov_view(10))) // They Woke Up! (Notice if within view) to_chat(L, "[target] has snapped out of their trance.") diff --git a/code/modules/antagonists/bloodsucker/powers/trespass.dm b/code/modules/antagonists/bloodsucker/powers/trespass.dm index c91b924bb7..cad3eeb88b 100644 --- a/code/modules/antagonists/bloodsucker/powers/trespass.dm +++ b/code/modules/antagonists/bloodsucker/powers/trespass.dm @@ -20,7 +20,7 @@ . = ..() if(!.) return - if(owner.notransform || !get_turf(owner)) + if(owner.mob_transforming || !get_turf(owner)) return FALSE return TRUE @@ -83,7 +83,7 @@ // Freeze Me user.next_move = world.time + mist_delay user.Stun(mist_delay, ignore_canstun = TRUE) - user.notransform = TRUE + user.mob_transforming = TRUE user.density = FALSE var/invis_was = user.invisibility user.invisibility = INVISIBILITY_MAXIMUM @@ -106,7 +106,7 @@ user.dir = get_dir(my_turf, target_turf) user.next_move = world.time + mist_delay / 2 user.Stun(mist_delay / 2, ignore_canstun = TRUE) - user.notransform = FALSE + user.mob_transforming = FALSE user.density = 1 user.invisibility = invis_was diff --git a/code/modules/antagonists/changeling/powers/humanform.dm b/code/modules/antagonists/changeling/powers/humanform.dm index 91119e1c06..c38bfe3b5b 100644 --- a/code/modules/antagonists/changeling/powers/humanform.dm +++ b/code/modules/antagonists/changeling/powers/humanform.dm @@ -21,7 +21,7 @@ var/datum/changelingprofile/chosen_prof = changeling.get_dna(chosen_name) if(!chosen_prof) return - if(!user || user.notransform) + if(!user || user.mob_transforming) return 0 to_chat(user, "We transform our appearance.") diff --git a/code/modules/antagonists/changeling/powers/lesserform.dm b/code/modules/antagonists/changeling/powers/lesserform.dm index 1f9ca0b3ff..f3690ef5c5 100644 --- a/code/modules/antagonists/changeling/powers/lesserform.dm +++ b/code/modules/antagonists/changeling/powers/lesserform.dm @@ -11,9 +11,9 @@ //Transform into a monkey. /obj/effect/proc_holder/changeling/lesserform/sting_action(mob/living/carbon/human/user) - if(!user || user.notransform) + if(!user || user.mob_transforming) return 0 to_chat(user, "Our genes cry out!") user.monkeyize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPORGANS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_KEEPSE) - return TRUE \ No newline at end of file + return TRUE diff --git a/code/modules/antagonists/revenant/revenant.dm b/code/modules/antagonists/revenant/revenant.dm index e06e8691b3..a639bd7aa6 100644 --- a/code/modules/antagonists/revenant/revenant.dm +++ b/code/modules/antagonists/revenant/revenant.dm @@ -120,7 +120,7 @@ to_chat(src, "You are once more concealed.") if(unstun_time && world.time >= unstun_time) unstun_time = 0 - notransform = FALSE + mob_transforming = FALSE to_chat(src, "You can move again!") if(essence_regenerating && !inhibited && essence < essence_regen_cap) //While inhibited, essence will not regenerate essence = min(essence_regen_cap, essence+essence_regen_amount) @@ -218,7 +218,7 @@ return 0 stasis = TRUE to_chat(src, "NO! No... it's too late, you can feel your essence [pick("breaking apart", "drifting away")]...") - notransform = TRUE + mob_transforming = TRUE revealed = TRUE invisibility = 0 playsound(src, 'sound/effects/screech.ogg', 100, 1) @@ -260,7 +260,7 @@ return if(time <= 0) return - notransform = TRUE + mob_transforming = TRUE if(!unstun_time) to_chat(src, "You cannot move!") unstun_time = world.time + time @@ -271,7 +271,7 @@ /mob/living/simple_animal/revenant/proc/update_spooky_icon() if(revealed) - if(notransform) + if(mob_transforming) if(draining) icon_state = icon_drain else @@ -320,7 +320,7 @@ /mob/living/simple_animal/revenant/proc/death_reset() revealed = FALSE unreveal_time = 0 - notransform = 0 + mob_transforming = 0 unstun_time = 0 inhibited = FALSE draining = FALSE diff --git a/code/modules/antagonists/wizard/equipment/artefact.dm b/code/modules/antagonists/wizard/equipment/artefact.dm index ff3d95598d..eaef7a35f5 100644 --- a/code/modules/antagonists/wizard/equipment/artefact.dm +++ b/code/modules/antagonists/wizard/equipment/artefact.dm @@ -369,7 +369,7 @@ var/mob/living/carbon/last_user /obj/item/warpwhistle/proc/interrupted(mob/living/carbon/user) - if(!user || QDELETED(src) || user.notransform) + if(!user || QDELETED(src) || user.mob_transforming) on_cooldown = FALSE return TRUE return FALSE diff --git a/code/modules/clothing/spacesuits/chronosuit.dm b/code/modules/clothing/spacesuits/chronosuit.dm index 94ccdf94c6..4590d46219 100644 --- a/code/modules/clothing/spacesuits/chronosuit.dm +++ b/code/modules/clothing/spacesuits/chronosuit.dm @@ -84,7 +84,7 @@ user.alpha = 255 user.update_atom_colour() user.animate_movement = FORWARD_STEPS - user.notransform = 0 + user.mob_transforming = 0 user.anchored = FALSE teleporting = 0 for(var/obj/item/I in user.held_items) @@ -125,7 +125,7 @@ ADD_TRAIT(I, TRAIT_NODROP, CHRONOSUIT_TRAIT) user.animate_movement = NO_STEPS user.changeNext_move(8 + phase_in_ds) - user.notransform = 1 + user.mob_transforming = 1 user.anchored = TRUE user.Stun(INFINITY) diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index b511cc793e..e611ccf232 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -492,7 +492,7 @@ setDir(user.dir) user.forceMove(src) - user.notransform = TRUE + user.mob_transforming = TRUE user.status_flags |= GODMODE can_destroy = FALSE @@ -501,7 +501,7 @@ /obj/effect/immortality_talisman/proc/unvanish(mob/user) user.status_flags &= ~GODMODE - user.notransform = FALSE + user.mob_transforming = FALSE user.forceMove(get_turf(src)) user.visible_message("[user] pops back into reality!") diff --git a/code/modules/mob/dead/dead.dm b/code/modules/mob/dead/dead.dm index 0c50cb0468..bd3a3d304a 100644 --- a/code/modules/mob/dead/dead.dm +++ b/code/modules/mob/dead/dead.dm @@ -68,7 +68,7 @@ INITIALIZE_IMMEDIATE(/mob/dead) set category = "OOC" set name = "Server Hop!" set desc= "Jump to the other server" - if(notransform) + if(mob_transforming) return var/list/csa = CONFIG_GET(keyed_list/cross_server) var/pick @@ -93,9 +93,9 @@ INITIALIZE_IMMEDIATE(/mob/dead) to_chat(C, "Sending you to [pick].") new /obj/screen/splash(C) - notransform = TRUE + mob_transforming = TRUE sleep(29) //let the animation play - notransform = FALSE + mob_transforming = FALSE if(!C) return diff --git a/code/modules/mob/living/bloodcrawl.dm b/code/modules/mob/living/bloodcrawl.dm index 3547d5f846..d3dbfac8c8 100644 --- a/code/modules/mob/living/bloodcrawl.dm +++ b/code/modules/mob/living/bloodcrawl.dm @@ -37,10 +37,10 @@ C.put_in_hands(B1) C.put_in_hands(B2) C.regenerate_icons() - src.notransform = TRUE + src.mob_transforming = TRUE spawn(0) bloodpool_sink(B) - src.notransform = FALSE + src.mob_transforming = FALSE return 1 /mob/living/proc/bloodpool_sink(obj/effect/decal/cleanable/B) @@ -155,7 +155,7 @@ addtimer(CALLBACK(src, /atom/.proc/remove_atom_colour, TEMPORARY_COLOUR_PRIORITY, newcolor), 6 SECONDS) /mob/living/proc/phasein(obj/effect/decal/cleanable/B) - if(src.notransform) + if(src.mob_transforming) to_chat(src, "Finish eating first!") return 0 B.visible_message("[B] starts to bubble...") diff --git a/code/modules/mob/living/brain/life.dm b/code/modules/mob/living/brain/life.dm index 51be1f6971..6d06da41ae 100644 --- a/code/modules/mob/living/brain/life.dm +++ b/code/modules/mob/living/brain/life.dm @@ -1,11 +1,7 @@ -/mob/living/brain/Life() - set invisibility = 0 - if (notransform) +/mob/living/brain/BiologicalLife(seconds, times_fired) + if(!(. = ..())) return - if(!loc) - return - . = ..() handle_emp_damage() /mob/living/brain/update_stat() diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index a4da38c4da..f0004b5ed9 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -1,14 +1,10 @@ - - -/mob/living/carbon/alien/larva/Life() - set invisibility = 0 - if (notransform) +/mob/living/carbon/alien/larva/BiologicalLife(seconds, times_fired) + if(!(. = ..())) return - if(..()) //not dead - // GROW! - if(amount_grown < max_grown) - amount_grown++ - update_icons() + // GROW! + if(amount_grown < max_grown) + amount_grown++ + update_icons() /mob/living/carbon/alien/larva/update_stat() diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm index 75aadd69c9..70c59d4943 100644 --- a/code/modules/mob/living/carbon/alien/life.dm +++ b/code/modules/mob/living/carbon/alien/life.dm @@ -1,6 +1,7 @@ -/mob/living/carbon/alien/Life() +/mob/living/carbon/alien/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return findQueen() - return..() /mob/living/carbon/alien/check_breath(datum/gas_mixture/breath) if(status_flags & GODMODE) diff --git a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm index 0e8764a372..9bb50bdf42 100644 --- a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm +++ b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm @@ -92,7 +92,7 @@ ghost.transfer_ckey(new_xeno, FALSE) SEND_SOUND(new_xeno, sound('sound/voice/hiss5.ogg',0,0,0,100)) //To get the player's attention new_xeno.Paralyze(6) - new_xeno.notransform = TRUE + new_xeno.mob_transforming = TRUE new_xeno.invisibility = INVISIBILITY_MAXIMUM sleep(6) @@ -102,7 +102,7 @@ if(new_xeno) new_xeno.SetParalyzed(0) - new_xeno.notransform = FALSE + new_xeno.mob_transforming = FALSE new_xeno.invisibility = 0 var/mob/living/carbon/old_owner = owner diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 86b6406081..d96fd97742 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -20,7 +20,7 @@ /mob/living/carbon/human/Life(seconds, times_fired) set invisibility = 0 - if (notransform) + if (mob_transforming) return . = ..() diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index b780af6b8a..7d56205e9b 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -239,7 +239,7 @@ "You focus intently on moving your body while \ standing perfectly still...") - H.notransform = TRUE + H.mob_transforming = TRUE if(do_after(owner, delay=60, needhand=FALSE, target=owner, progress=TRUE)) if(H.blood_volume >= BLOOD_VOLUME_SLIME_SPLIT) @@ -249,7 +249,7 @@ else to_chat(H, "...but fail to stand perfectly still!") - H.notransform = FALSE + H.mob_transforming = FALSE /datum/action/innate/split_body/proc/make_dupe() var/mob/living/carbon/human/H = owner @@ -267,7 +267,7 @@ spare.Move(get_step(H.loc, pick(NORTH,SOUTH,EAST,WEST))) H.blood_volume *= 0.45 - H.notransform = 0 + H.mob_transforming = 0 var/datum/species/jelly/slime/origin_datum = H.dna.species origin_datum.bodies |= spare diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 4e5b033688..641f8887df 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -1,7 +1,7 @@ /mob/living/carbon/Life() set invisibility = 0 - if(notransform) + if(mob_transforming) return if(damageoverlaytemp) diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index edbd1562b3..374707e5f4 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -6,7 +6,7 @@ /mob/living/carbon/monkey/Life() set invisibility = 0 - if (notransform) + if (mob_transforming) return if(..()) diff --git a/code/modules/mob/living/carbon/update_icons.dm b/code/modules/mob/living/carbon/update_icons.dm index 9a1c6c54b6..4899067d7b 100644 --- a/code/modules/mob/living/carbon/update_icons.dm +++ b/code/modules/mob/living/carbon/update_icons.dm @@ -12,7 +12,7 @@ overlays_standing[cache_index] = null /mob/living/carbon/regenerate_icons() - if(notransform) + if(mob_transforming) return 1 update_inv_hands() update_inv_handcuffed() diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 5e04e3ec16..a41b44ce98 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -1,12 +1,21 @@ +/** + * Called by SSmobs at (hopefully) an interval of 1 second. + * Splits off into PhysicalLife() and BiologicalLife(). Override those instead of this. + */ /mob/living/proc/Life(seconds, times_fired) - set waitfor = FALSE - set invisibility = 0 + SHOULD_NOT_OVERRIDE(TRUE) + SHOULD_NOT_SLEEP(TRUE) + if(mob_transforming) + return - if(digitalinvis) - handle_diginvis() //AI becomes unable to see mob + . = SEND_SIGNAL(src, COMSIG_LIVING_LIFE, seconds, times_fired) + if(!(. & COMPONENT_INTERRUPT_LIFE_PHYSICAL)) + PhysicalLife(seconds, times_fired) + if(!(. & COMPONENT_INTERRUPT_LIFE_BIOLOGICAL)) + BiologicalLife(seconds, times_fired) - if((movement_type & FLYING) && !(movement_type & FLOATING)) //TODO: Better floating - float(on = TRUE) + // CODE BELOW SHOULD ONLY BE THINGS THAT SHOULD HAPPEN NO MATTER WHAT AND CAN NOT BE SUSPENDED! + // Otherwise, it goes into one of the two split Life procs! if (client) var/turf/T = get_turf(src) @@ -30,28 +39,58 @@ log_game("Z-TRACKING: [src] of type [src.type] has a Z-registration despite not having a client.") update_z(null) - if (notransform) - return - if(!loc) - return - var/datum/gas_mixture/environment = loc.return_air() - - if(stat != DEAD) - //Mutations and radiation - handle_mutations_and_radiation() - - if(stat != DEAD) - //Breathing, if applicable - handle_breathing(times_fired) +/** + * Handles biological life processes like chemical metabolism, breathing, etc + * Returns TRUE or FALSE based on if we were interrupted. This is used by overridden variants to check if they should stop. + */ +/mob/living/proc/BiologicalLife(seconds, times_fired) + SHOULD_NOT_SLEEP(TRUE) handle_diseases()// DEAD check is in the proc itself; we want it to spread even if the mob is dead, but to handle its disease-y properties only if you're not. - if (QDELETED(src)) // diseases can qdel the mob via transformations - return + // Everything after this shouldn't process while dead (as of the time of writing) + if(stat == DEAD) + return FALSE - if(stat != DEAD) - //Random events (vomiting etc) - handle_random_events() + //Mutations and radiation + handle_mutations_and_radiation() + + //Breathing, if applicable + handle_breathing(times_fired) + + if (QDELETED(src)) // diseases can qdel the mob via transformations + return FALSE + + //Random events (vomiting etc) + handle_random_events() + + //stuff in the stomach + handle_stomach() + + handle_block_parry(seconds) + + // These two MIGHT need to be moved to base Life() if we get any in the future that's a "physical" effect that needs to fire even while in stasis. + handle_traits() // eye, ear, brain damages + handle_status_effects() //all special effects, stun, knockdown, jitteryness, hallucination, sleeping, etc + return TRUE + +/** + * Handles physical life processes like being on fire. Don't ask why this is considered "Life". + * Returns TRUE or FALSE based on if we were interrupted. This is used by overridden variants to check if they should stop. + */ +/mob/living/proc/PhysicalLife(seconds, times_fired) + SHOULD_NOT_SLEEP(TRUE) + + if(digitalinvis) + handle_diginvis() //AI becomes unable to see mob + + if((movement_type & FLYING) && !(movement_type & FLOATING)) //TODO: Better floating + float(on = TRUE) + + if(!loc) + return FALSE + + var/datum/gas_mixture/environment = loc.return_air() //Handle temperature/pressure differences between body and environment if(environment) @@ -59,23 +98,11 @@ handle_fire() - //stuff in the stomach - handle_stomach() - handle_gravity() - handle_block_parry(seconds) - if(machine) machine.check_eye(src) - - if(stat != DEAD) - handle_traits() // eye, ear, brain damages - if(stat != DEAD) - handle_status_effects() //all special effects, stun, knockdown, jitteryness, hallucination, sleeping, etc - - if(stat != DEAD) - return 1 + return TRUE /mob/living/proc/handle_breathing(times_fired) return @@ -168,4 +195,4 @@ /mob/living/proc/handle_high_gravity(gravity) if(gravity >= GRAVITY_DAMAGE_TRESHOLD) //Aka gravity values of 3 or more var/grav_stregth = gravity - GRAVITY_DAMAGE_TRESHOLD - adjustBruteLoss(min(grav_stregth,3)) \ No newline at end of file + adjustBruteLoss(min(grav_stregth,3)) diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index e04943a8c5..a5312f94f2 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -1,6 +1,6 @@ /mob/living/silicon/robot/Life() set invisibility = 0 - if (src.notransform) + if (src.mob_transforming) return ..() diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index bf66556399..cb43a8489a 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -259,7 +259,7 @@ var/prev_locked_down = R.locked_down sleep(1) flick("[cyborg_base_icon]_transform", R) - R.notransform = TRUE + R.mob_transforming = TRUE R.SetLockdown(1) R.anchored = TRUE sleep(1) @@ -270,7 +270,7 @@ R.SetLockdown(0) R.setDir(SOUTH) R.anchored = FALSE - R.notransform = FALSE + R.mob_transforming = FALSE R.update_headlamp() R.notify_ai(NEW_MODULE) if(R.hud_used) diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm index 8c73665b9b..ba9cdfda64 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -46,9 +46,10 @@ udder = null return ..() -/mob/living/simple_animal/hostile/retaliate/goat/Life() - . = ..() - if(.) +/mob/living/simple_animal/hostile/retaliate/goat/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return + if(stat == CONSCIOUS) //chance to go crazy and start wacking stuff if(!enemies.len && prob(1)) Retaliate() @@ -57,7 +58,6 @@ enemies = list() LoseTarget() src.visible_message("[src] calms down.") - if(stat == CONSCIOUS) udder.generateMilk(milk_reagent) eat_plants() if(!pulledby) @@ -160,8 +160,9 @@ else return ..() -/mob/living/simple_animal/cow/Life() - . = ..() +/mob/living/simple_animal/cow/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return if(stat == CONSCIOUS) udder.generateMilk(milk_reagent) @@ -244,9 +245,8 @@ pixel_x = rand(-6, 6) pixel_y = rand(0, 10) -/mob/living/simple_animal/chick/Life() - . =..() - if(!.) +/mob/living/simple_animal/chick/BiologicalLife(seconds, times_fired) + if(!(. = ..())) return if(!stat && !ckey) amount_grown += rand(1,2) @@ -254,8 +254,9 @@ new /mob/living/simple_animal/chicken(src.loc) qdel(src) -/mob/living/simple_animal/chick/holo/Life() - ..() +/mob/living/simple_animal/chick/holo/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return amount_grown = 0 /mob/living/simple_animal/chicken @@ -328,9 +329,8 @@ else ..() -/mob/living/simple_animal/chicken/Life() - . =..() - if(!.) +/mob/living/simple_animal/chicken/BiologicalLife(seconds, times_fired) + if(!(. = ..())) return if((!stat && prob(3) && eggsleft > 0) && egg_type) visible_message("[src] [pick(layMessage)]") @@ -403,9 +403,8 @@ . = ..() ++kiwi_count -/mob/living/simple_animal/kiwi/Life() - . =..() - if(!.) +/mob/living/simple_animal/kiwi/BiologicalLife(seconds, times_fired) + if(!(. = ..())) return if((!stat && prob(3) && eggsleft > 0) && egg_type) visible_message("[src] [pick(layMessage)]") @@ -478,9 +477,8 @@ pixel_x = rand(-6, 6) pixel_y = rand(0, 10) -/mob/living/simple_animal/babyKiwi/Life() - . =..() - if(!.) +/mob/living/simple_animal/babyKiwi/BiologicalLife(seconds, times_fired) + if(!(. = ..())) return if(!stat && !ckey) amount_grown += rand(1,2) @@ -546,4 +544,4 @@ health = 75 maxHealth = 75 blood_volume = BLOOD_VOLUME_NORMAL - footstep_type = FOOTSTEP_MOB_SHOE \ No newline at end of file + footstep_type = FOOTSTEP_MOB_SHOE diff --git a/code/modules/mob/living/simple_animal/friendly/plushie.dm b/code/modules/mob/living/simple_animal/friendly/plushie.dm index d992c704f5..ff95e8fe86 100644 --- a/code/modules/mob/living/simple_animal/friendly/plushie.dm +++ b/code/modules/mob/living/simple_animal/friendly/plushie.dm @@ -72,8 +72,8 @@ qdel(src) //low regen over time -/mob/living/simple_animal/pet/plushie/Life() - if(stat) +/mob/living/simple_animal/pet/plushie/BiologicalLife(seconds, times_fired) + if(!(. = ..())) return if(health < maxHealth) heal_overall_damage(5) //Decent life regen, they're not able to hurt anyone so this shouldn't be an issue (butterbear for reference has 10 regen) diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm index 0e864a1e37..5dbf3e8e3b 100644 --- a/code/modules/mob/living/simple_animal/hostile/bear.dm +++ b/code/modules/mob/living/simple_animal/hostile/bear.dm @@ -125,7 +125,7 @@ mob/living/simple_animal/hostile/bear/butter //The mighty companion to Cak. Seve attack_verb_continuous = "slaps" attack_verb_simple = "slap" -/mob/living/simple_animal/hostile/bear/butter/Life() //Heals butter bear really fast when he takes damage. +/mob/living/simple_animal/hostile/bear/butter/BiologicalLife(seconds, times_fired) //Heals butter bear really fast when he takes damage. if(stat) return if(health < maxHealth) diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm index a56a8dcc29..f775d6600c 100644 --- a/code/modules/mob/living/simple_animal/hostile/carp.dm +++ b/code/modules/mob/living/simple_animal/hostile/carp.dm @@ -47,8 +47,9 @@ if(regen_amount) regen_cooldown = world.time + REGENERATION_DELAY -/mob/living/simple_animal/hostile/carp/Life() - . = ..() +/mob/living/simple_animal/hostile/carp/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return if(regen_amount && regen_cooldown < world.time) heal_overall_damage(regen_amount) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index e8991df358..945842d5ed 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -67,11 +67,10 @@ foes = null return ..() -/mob/living/simple_animal/hostile/Life() - . = ..() - if(!.) //dead +/mob/living/simple_animal/hostile/BiologicalLife(seconds, times_fired) + if(!(. = ..())) walk(src, 0) //stops walking - return 0 + return /mob/living/simple_animal/hostile/handle_automated_action() if(AIStatus == AI_OFF) diff --git a/code/modules/mob/living/simple_animal/hostile/illusion.dm b/code/modules/mob/living/simple_animal/hostile/illusion.dm index cab87010ef..f561f0d43c 100644 --- a/code/modules/mob/living/simple_animal/hostile/illusion.dm +++ b/code/modules/mob/living/simple_animal/hostile/illusion.dm @@ -23,13 +23,12 @@ deathmessage = "vanishes into thin air! It was a fake!" has_field_of_vision = FALSE //not meant to be played anyway. - -/mob/living/simple_animal/hostile/illusion/Life() - ..() +/mob/living/simple_animal/hostile/illusion/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return if(world.time > life_span) death() - /mob/living/simple_animal/hostile/illusion/proc/Copy_Parent(mob/living/original, life = 50, hp = 100, damage = 0, replicate = 0 ) appearance = original.appearance parent_mob = original diff --git a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm index 574811c968..51f61fa158 100644 --- a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm +++ b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm @@ -166,8 +166,9 @@ if(!hopping) Hop() -/mob/living/simple_animal/hostile/jungle/leaper/Life() - . = ..() +/mob/living/simple_animal/hostile/jungle/leaper/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return update_icons() /mob/living/simple_animal/hostile/jungle/leaper/adjustHealth(amount, updating_health = TRUE, forced = FALSE) @@ -197,7 +198,7 @@ hopping = TRUE density = FALSE pass_flags |= PASSMOB - notransform = TRUE + mob_transforming = TRUE var/turf/new_turf = locate((target.x + rand(-3,3)),(target.y + rand(-3,3)),target.z) if(player_hop) new_turf = get_turf(target) @@ -209,7 +210,7 @@ /mob/living/simple_animal/hostile/jungle/leaper/proc/FinishHop() density = TRUE - notransform = FALSE + mob_transforming = FALSE pass_flags &= ~PASSMOB hopping = FALSE playsound(src.loc, 'sound/effects/meteorimpact.ogg', 100, 1) @@ -220,7 +221,7 @@ /mob/living/simple_animal/hostile/jungle/leaper/proc/BellyFlop() var/turf/new_turf = get_turf(target) hopping = TRUE - notransform = TRUE + mob_transforming = TRUE new /obj/effect/temp_visual/leaper_crush(new_turf) addtimer(CALLBACK(src, .proc/BellyFlopHop, new_turf), 30) @@ -231,7 +232,7 @@ /mob/living/simple_animal/hostile/jungle/leaper/proc/Crush() hopping = FALSE density = TRUE - notransform = FALSE + mob_transforming = FALSE playsound(src, 'sound/effects/meteorimpact.ogg', 200, 1) for(var/mob/living/L in orange(1, src)) L.adjustBruteLoss(35) diff --git a/code/modules/mob/living/simple_animal/hostile/jungle/mega_arachnid.dm b/code/modules/mob/living/simple_animal/hostile/jungle/mega_arachnid.dm index 40274c0029..99349168f0 100644 --- a/code/modules/mob/living/simple_animal/hostile/jungle/mega_arachnid.dm +++ b/code/modules/mob/living/simple_animal/hostile/jungle/mega_arachnid.dm @@ -27,8 +27,9 @@ footstep_type = FOOTSTEP_MOB_CLAW -/mob/living/simple_animal/hostile/jungle/mega_arachnid/Life() - ..() +/mob/living/simple_animal/hostile/jungle/mega_arachnid/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return if(target && ranged_cooldown > world.time && iscarbon(target)) var/mob/living/carbon/C = target if(!C.legcuffed && C.health < 50) @@ -40,7 +41,6 @@ minimum_distance = 0 alpha = 255 - /mob/living/simple_animal/hostile/jungle/mega_arachnid/Aggro() ..() alpha = 255 diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm index fe6c2290c4..b191eaf3fb 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm @@ -65,8 +65,9 @@ Difficulty: Hard desc = "You're not quite sure how a signal can be bloody." invisibility = 100 -/mob/living/simple_animal/hostile/megafauna/bubblegum/Life() - ..() +/mob/living/simple_animal/hostile/megafauna/bubblegum/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return move_to_delay = clamp(round((health/maxHealth) * 10), 3, 10) /mob/living/simple_animal/hostile/megafauna/bubblegum/OpenFire() diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index 04ff9413aa..5816be2917 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -731,7 +731,7 @@ Difficulty: Very Hard /obj/structure/closet/stasis/Entered(atom/A) if(isliving(A) && holder_animal) var/mob/living/L = A - L.notransform = 1 + L.mob_transforming = 1 ADD_TRAIT(L, TRAIT_MUTE, STASIS_MUTE) L.status_flags |= GODMODE L.mind.transfer_to(holder_animal) @@ -744,7 +744,7 @@ Difficulty: Very Hard for(var/mob/living/L in src) REMOVE_TRAIT(L, TRAIT_MUTE, STASIS_MUTE) L.status_flags &= ~GODMODE - L.notransform = 0 + L.mob_transforming = 0 if(holder_animal) holder_animal.mind.transfer_to(L) L.mind.RemoveSpell(/obj/effect/proc_holder/spell/targeted/exit_possession) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm index 4ade831f95..a66ee7b1de 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm @@ -88,9 +88,10 @@ Difficulty: Normal /mob/living/simple_animal/hostile/megafauna/hierophant/spawn_crusher_loot() new /obj/item/crusher_trophy/vortex_talisman(get_turf(spawned_beacon)) -/mob/living/simple_animal/hostile/megafauna/hierophant/Life() - . = ..() - if(. && spawned_beacon && !QDELETED(spawned_beacon) && !client) +/mob/living/simple_animal/hostile/megafauna/hierophant/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return + if(spawned_beacon && !QDELETED(spawned_beacon) && !client) if(target || loc == spawned_beacon.loc) timeout_time = initial(timeout_time) else diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/swarmer.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/swarmer.dm index 50c6025378..db6468d1b5 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/swarmer.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/swarmer.dm @@ -73,14 +73,13 @@ GLOBAL_LIST_INIT(AISwarmerCapsByType, list(/mob/living/simple_animal/hostile/swa step(R, ddir) //Step the swarmers, instead of spawning them there, incase the turf is solid -/mob/living/simple_animal/hostile/megafauna/swarmer_swarm_beacon/Life() - . = ..() - if(.) - var/createtype = GetUncappedAISwarmerType() - if(createtype && world.time > swarmer_spawn_cooldown && GLOB.AISwarmers.len < (GetTotalAISwarmerCap()*0.5)) - swarmer_spawn_cooldown = world.time + swarmer_spawn_cooldown_amt - new createtype(loc) - +/mob/living/simple_animal/hostile/megafauna/swarmer_swarm_beacon/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return + var/createtype = GetUncappedAISwarmerType() + if(createtype && world.time > swarmer_spawn_cooldown && GLOB.AISwarmers.len < (GetTotalAISwarmerCap()*0.5)) + swarmer_spawn_cooldown = world.time + swarmer_spawn_cooldown_amt + new createtype(loc) /mob/living/simple_animal/hostile/megafauna/swarmer_swarm_beacon/adjustHealth(amount, updating_health = TRUE, forced = FALSE) . = ..() diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 5afe109550..c2d05e43d9 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -118,8 +118,9 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca overlay_googly_eyes = FALSE CopyObject(copy, creator, destroy_original) -/mob/living/simple_animal/hostile/mimic/copy/Life() - ..() +/mob/living/simple_animal/hostile/mimic/copy/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return if(idledamage && !target && !ckey) //Objects eventually revert to normal if no one is around to terrorize adjustBruteLoss(1) for(var/mob/living/M in contents) //a fix for animated statues from the flesh to stone spell diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm index 306011dc80..13738b20e1 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm @@ -88,8 +88,9 @@ wanted_objects = list(/obj/item/pen/survival, /obj/item/stack/ore/diamond) field_of_vision_type = FOV_270_DEGREES //Obviously, it's one eyeball. -/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/Life() - . = ..() +/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return if(stat == CONSCIOUS) consume_bait() diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/goliath_broodmother.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/goliath_broodmother.dm index e662f4e525..80489e0e40 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/goliath_broodmother.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/goliath_broodmother.dm @@ -97,9 +97,8 @@ if(CALL_CHILDREN) call_children() -/mob/living/simple_animal/hostile/asteroid/elite/broodmother/Life() - . = ..() - if(!.) //Checks if they are dead as a rock. +/mob/living/simple_animal/hostile/asteroid/elite/broodmother/BiologicalLife(seconds, times_fired) + if(!(. = ..())) return if(health < maxHealth * 0.5 && rand_tent < world.time) rand_tent = world.time + 30 diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/pandora.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/pandora.dm index ebbf032859..cdef0c50d3 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/pandora.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/pandora.dm @@ -95,8 +95,9 @@ if(AOE_SQUARES) aoe_squares(target) -/mob/living/simple_animal/hostile/asteroid/elite/pandora/Life() - . = ..() +/mob/living/simple_animal/hostile/asteroid/elite/pandora/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return if(health >= maxHealth * 0.5) cooldown_time = 20 return diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm index a61f1924c8..5f6c21bbbd 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm @@ -39,8 +39,9 @@ footstep_type = FOOTSTEP_MOB_HEAVY -/mob/living/simple_animal/hostile/asteroid/goliath/Life() - . = ..() +/mob/living/simple_animal/hostile/asteroid/goliath/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return handle_preattack() /mob/living/simple_animal/hostile/asteroid/goliath/proc/handle_preattack() @@ -129,9 +130,8 @@ var/turf/last_location var/tentacle_recheck_cooldown = 100 -/mob/living/simple_animal/hostile/asteroid/goliath/beast/ancient/Life() - . = ..() - if(!.) // dead +/mob/living/simple_animal/hostile/asteroid/goliath/beast/ancient/BiologicalLife(seconds, times_fired) + if(!(. = ..())) return if(isturf(loc)) if(!LAZYLEN(cached_tentacle_turfs) || loc != last_location || tentacle_recheck_cooldown <= world.time) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm index d21e39ef54..c371242bf2 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm @@ -196,12 +196,13 @@ swarming = TRUE var/can_infest_dead = FALSE -/mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/Life() +/mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return if(isturf(loc)) for(var/mob/living/carbon/human/H in view(src,1)) //Only for corpse right next to/on same tile if(H.stat == UNCONSCIOUS || (can_infest_dead && H.stat == DEAD)) infest(H) - ..() /mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/proc/infest(mob/living/carbon/human/H) visible_message("[name] burrows into the flesh of [H]!") diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/ice_demon.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/ice_demon.dm index 66241e3d75..d40cd8636c 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/ice_demon.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/ice_demon.dm @@ -62,9 +62,10 @@ SLEEP_CHECK_DEATH(8) return ..() -/mob/living/simple_animal/hostile/asteroid/ice_demon/Life() - . = ..() - if(!. || target) +/mob/living/simple_animal/hostile/asteroid/ice_demon/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return + if(target) return adjustHealth(-maxHealth*0.025) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/ice_whelp.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/ice_whelp.dm index b62fb4a665..7214fd71e0 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/ice_whelp.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/ice_whelp.dm @@ -43,9 +43,10 @@ var/list/burn_turfs = getline(src, T) - get_turf(src) dragon_fire_line(src, burn_turfs) -/mob/living/simple_animal/hostile/asteroid/ice_whelp/Life() - . = ..() - if(!. || target) +/mob/living/simple_animal/hostile/asteroid/ice_whelp/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return + if(target) return adjustHealth(-maxHealth*0.025) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/polarbear.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/polarbear.dm index ac2ce37d3f..de9464cc16 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/polarbear.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/polarbear.dm @@ -44,9 +44,10 @@ aggressive_message_said = TRUE rapid_melee = 2 -/mob/living/simple_animal/hostile/asteroid/polarbear/Life() - . = ..() - if(!. || target) +/mob/living/simple_animal/hostile/asteroid/polarbear/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return + if(target) return adjustHealth(-maxHealth*0.025) aggressive_message_said = FALSE diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/wolf.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/wolf.dm index 013a75be75..8c4db48434 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/wolf.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/wolf.dm @@ -51,9 +51,10 @@ retreat_message_said = TRUE retreat_distance = 30 -/mob/living/simple_animal/hostile/asteroid/wolf/Life() - . = ..() - if(!. || target) +/mob/living/simple_animal/hostile/asteroid/wolf/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return + if(target) return adjustHealth(-maxHealth*0.025) retreat_message_said = FALSE diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm index 1b13200729..4c9afd3784 100644 --- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm +++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm @@ -48,8 +48,9 @@ else . += "It looks like it's been roughed up." -/mob/living/simple_animal/hostile/mushroom/Life() - ..() +/mob/living/simple_animal/hostile/mushroom/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return if(!stat)//Mushrooms slowly regenerate if conscious, for people who want to save them from being eaten adjustBruteLoss(-2) diff --git a/code/modules/mob/living/simple_animal/hostile/netherworld.dm b/code/modules/mob/living/simple_animal/hostile/netherworld.dm index ca5d047326..1db6854f96 100644 --- a/code/modules/mob/living/simple_animal/hostile/netherworld.dm +++ b/code/modules/mob/living/simple_animal/hostile/netherworld.dm @@ -46,8 +46,9 @@ var/chosen_sound = pick(migo_sounds) playsound(src, chosen_sound, 100, TRUE) -/mob/living/simple_animal/hostile/netherworld/migo/Life() - ..() +/mob/living/simple_animal/hostile/netherworld/migo/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return if(stat) return if(prob(10)) diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index 23304a2ef3..3490d757a1 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -82,8 +82,9 @@ return 0 return ..() -/mob/living/simple_animal/hostile/statue/Life() - ..() +/mob/living/simple_animal/hostile/statue/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return if(!client && target) // If we have a target and we're AI controlled var/mob/watching = can_be_seen() // If they're not our target diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm index 6e8c79c3d0..9cc385fc77 100644 --- a/code/modules/mob/living/simple_animal/slime/life.dm +++ b/code/modules/mob/living/simple_animal/slime/life.dm @@ -7,19 +7,17 @@ var/SStun = 0 // stun variable -/mob/living/simple_animal/slime/Life() - set invisibility = 0 - if (notransform) +/mob/living/simple_animal/slime/BiologicalLife(seconds, times_fired) + if(!(. = ..())) return - if(..()) - if(buckled) - handle_feeding() - if(!stat) // Slimes in stasis don't lose nutrition, don't change mood and don't respond to speech - handle_nutrition() - handle_targets() - if (!ckey) - handle_mood() - handle_speech() + if(buckled) + handle_feeding() + if(!stat) // Slimes in stasis don't lose nutrition, don't change mood and don't respond to speech + handle_nutrition() + handle_targets() + if (!ckey) + handle_mood() + handle_speech() // Unlike most of the simple animals, slimes support UNCONSCIOUS /mob/living/simple_animal/slime/update_stat() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 4c692e7175..c5d2a34f89 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -678,7 +678,7 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0) return FALSE if(anchored) return FALSE - if(notransform) + if(mob_transforming) return FALSE if(restrained()) return FALSE diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 9dcfb4e99a..dbf7b7f350 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -37,7 +37,9 @@ var/next_move = null var/create_area_cooldown - var/notransform = null //Carbon + /// Whether or not the mob is currently being transformed into another mob or into another state of being. This will prevent it from moving or doing realistically anything. + /// Don't you DARE use this for a cheap way to ensure someone is stunned in your code. + var/mob_transforming = FALSE var/eye_blind = 0 //Carbon var/eye_blurry = 0 //Carbon var/real_name = null diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 9867da1ed4..e977c397c9 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -32,7 +32,7 @@ if(!n || !direction || !mob?.loc) return FALSE //GET RID OF THIS SOON AS MOBILITY FLAGS IS DONE - if(mob.notransform) + if(mob.mob_transforming) return FALSE if(mob.control_object) diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 56ec5bb816..5fd94c8a89 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -1,5 +1,5 @@ /mob/living/carbon/proc/monkeyize(tr_flags = (TR_KEEPITEMS | TR_KEEPVIRUS | TR_DEFAULTMSG)) - if (notransform) + if (mob_transforming) return //Handle items on mob @@ -29,7 +29,7 @@ dropItemToGround(W) //Make mob invisible and spawn animation - notransform = TRUE + mob_transforming = TRUE Stun(INFINITY, ignore_canstun = TRUE) icon = null cut_overlays() @@ -150,7 +150,7 @@ //Could probably be merged with monkeyize but other transformations got their own procs, too /mob/living/carbon/proc/humanize(tr_flags = (TR_KEEPITEMS | TR_KEEPVIRUS | TR_DEFAULTMSG)) - if (notransform) + if (mob_transforming) return //Handle items on mob @@ -185,7 +185,7 @@ //Make mob invisible and spawn animation - notransform = TRUE + mob_transforming = TRUE Stun(22, ignore_canstun = TRUE) icon = null cut_overlays() @@ -304,7 +304,7 @@ qdel(src) /mob/living/carbon/human/AIize() - if (notransform) + if (mob_transforming) return for(var/t in bodyparts) qdel(t) @@ -312,12 +312,12 @@ return ..() /mob/living/carbon/AIize() - if(notransform) + if(mob_transforming) return for(var/obj/item/W in src) dropItemToGround(W) regenerate_icons() - notransform = TRUE + mob_transforming = TRUE Paralyze(INFINITY) icon = null invisibility = INVISIBILITY_MAXIMUM @@ -353,7 +353,7 @@ qdel(src) /mob/living/carbon/human/proc/Robotize(delete_items = 0, transfer_after = TRUE) - if (notransform) + if (mob_transforming) return for(var/obj/item/W in src) if(delete_items) @@ -361,7 +361,7 @@ else dropItemToGround(W) regenerate_icons() - notransform = TRUE + mob_transforming = TRUE Paralyze(INFINITY) icon = null invisibility = INVISIBILITY_MAXIMUM @@ -398,12 +398,12 @@ //human -> alien /mob/living/carbon/human/proc/Alienize(mind_transfer = TRUE) - if (notransform) + if (mob_transforming) return for(var/obj/item/W in src) dropItemToGround(W) regenerate_icons() - notransform = 1 + mob_transforming = 1 Paralyze(INFINITY) icon = null invisibility = INVISIBILITY_MAXIMUM @@ -432,12 +432,12 @@ qdel(src) /mob/living/carbon/human/proc/slimeize(reproduce, mind_transfer = TRUE) - if (notransform) + if (mob_transforming) return for(var/obj/item/W in src) dropItemToGround(W) regenerate_icons() - notransform = 1 + mob_transforming = 1 Paralyze(INFINITY) icon = null invisibility = INVISIBILITY_MAXIMUM @@ -477,12 +477,12 @@ /mob/living/carbon/human/proc/corgize(mind_transfer = TRUE) - if (notransform) + if (mob_transforming) return for(var/obj/item/W in src) dropItemToGround(W) regenerate_icons() - notransform = TRUE + mob_transforming = TRUE Paralyze(INFINITY) icon = null invisibility = INVISIBILITY_MAXIMUM @@ -501,7 +501,7 @@ qdel(src) /mob/living/carbon/proc/gorillize(mind_transfer = TRUE) - if(notransform) + if(mob_transforming) return SSblackbox.record_feedback("amount", "gorillas_created", 1) @@ -512,7 +512,7 @@ dropItemToGround(W, TRUE) regenerate_icons() - notransform = TRUE + mob_transforming = TRUE Paralyze(INFINITY) icon = null invisibility = INVISIBILITY_MAXIMUM @@ -535,13 +535,13 @@ if(mind) mind_transfer = alert("Want to transfer their mind into the new mob", "Mind Transfer", "Yes", "No") == "Yes" ? TRUE : FALSE - if(notransform) + if(mob_transforming) return for(var/obj/item/W in src) dropItemToGround(W) regenerate_icons() - notransform = TRUE + mob_transforming = TRUE Paralyze(INFINITY) icon = null invisibility = INVISIBILITY_MAXIMUM diff --git a/code/modules/projectiles/guns/ballistic/launchers.dm b/code/modules/projectiles/guns/ballistic/launchers.dm index 34572d609d..004f78235a 100644 --- a/code/modules/projectiles/guns/ballistic/launchers.dm +++ b/code/modules/projectiles/guns/ballistic/launchers.dm @@ -144,13 +144,13 @@ user.visible_message("[user] aims [src] at the ground! It looks like [user.p_theyre()] performing a sick rocket jump!", \ "You aim [src] at the ground to perform a bisnasty rocket jump...") if(can_shoot()) - user.notransform = TRUE + user.mob_transforming = TRUE playsound(src, 'sound/vehicles/rocketlaunch.ogg', 80, 1, 5) animate(user, pixel_z = 300, time = 30, easing = LINEAR_EASING) sleep(70) animate(user, pixel_z = 0, time = 5, easing = LINEAR_EASING) sleep(5) - user.notransform = FALSE + user.mob_transforming = FALSE process_fire(user, user, TRUE) if(!QDELETED(user)) //if they weren't gibbed by the explosion, take care of them for good. user.gib() diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 493a02d74c..7ef52aef25 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -121,10 +121,10 @@ qdel(src) /proc/wabbajack(mob/living/M) - if(!istype(M) || M.stat == DEAD || M.notransform || (GODMODE & M.status_flags)) + if(!istype(M) || M.stat == DEAD || M.mob_transforming || (GODMODE & M.status_flags)) return - M.notransform = TRUE + M.mob_transforming = TRUE M.Paralyze(INFINITY) M.icon = null M.cut_overlays() diff --git a/code/modules/ruins/lavalandruin_code/puzzle.dm b/code/modules/ruins/lavalandruin_code/puzzle.dm index 70b0545ded..92e24e3bc4 100644 --- a/code/modules/ruins/lavalandruin_code/puzzle.dm +++ b/code/modules/ruins/lavalandruin_code/puzzle.dm @@ -289,7 +289,7 @@ /obj/effect/sliding_puzzle/prison/dispense_reward() prisoner.forceMove(get_turf(src)) - prisoner.notransform = FALSE + prisoner.mob_transforming = FALSE prisoner = null //Some armor so it's harder to kill someone by mistake. @@ -329,7 +329,7 @@ return FALSE //First grab the prisoner and move them temporarily into the generator so they won't get thrown around. - prisoner.notransform = TRUE + prisoner.mob_transforming = TRUE prisoner.forceMove(cube) to_chat(prisoner,"You're trapped by the prison cube! You will remain trapped until someone solves it.") @@ -350,4 +350,4 @@ //Move them into random block var/obj/structure/puzzle_element/E = pick(cube.elements) prisoner.forceMove(E) - return TRUE \ No newline at end of file + return TRUE diff --git a/code/modules/ruins/spaceruin_code/hilbertshotel.dm b/code/modules/ruins/spaceruin_code/hilbertshotel.dm index a60d564631..ec5e98b2e6 100644 --- a/code/modules/ruins/spaceruin_code/hilbertshotel.dm +++ b/code/modules/ruins/spaceruin_code/hilbertshotel.dm @@ -413,13 +413,13 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) . = ..() if(ismob(AM)) var/mob/M = AM - M.notransform = TRUE + M.mob_transforming = TRUE /obj/item/abstracthotelstorage/Exited(atom/movable/AM, atom/newLoc) . = ..() if(ismob(AM)) var/mob/M = AM - M.notransform = FALSE + M.mob_transforming = FALSE //Space Ruin stuff /area/ruin/space/has_grav/hilbertresearchfacility diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index 77fb37b65c..098c5d34b3 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -504,7 +504,7 @@ if(M.mind && !istype(t, /turf/open/floor/plasteel/shuttle/red) && !istype(t, /turf/open/floor/mineral/plastitanium/red/brig)) M.mind.force_escaped = TRUE // Ghostize them and put them in nullspace stasis (for stat & possession checks) - M.notransform = TRUE + M.mob_transforming = TRUE M.ghostize(FALSE) M.moveToNullspace() diff --git a/code/modules/spells/spell_types/devil.dm b/code/modules/spells/spell_types/devil.dm index 34b033fd17..438c762ef6 100644 --- a/code/modules/spells/spell_types/devil.dm +++ b/code/modules/spells/spell_types/devil.dm @@ -118,14 +118,14 @@ revert_cast() return ..() else - user.notransform = TRUE + user.mob_transforming = TRUE user.fakefire() to_chat(src, "You begin to phase back into sinful flames.") if(do_mob(user,user,150)) user.infernalphaseout() else to_chat(user, "You must remain still while exiting.") - user.notransform = FALSE + user.mob_transforming = FALSE user.fakefireextinguish() start_recharge() return @@ -149,11 +149,11 @@ ExtinguishMob() forceMove(holder) holder = holder - notransform = 0 + mob_transforming = 0 fakefireextinguish() /mob/living/proc/infernalphasein() - if(notransform) + if(mob_transforming) to_chat(src, "You're too busy to jaunt in.") return FALSE fakefire() diff --git a/code/modules/spells/spell_types/ethereal_jaunt.dm b/code/modules/spells/spell_types/ethereal_jaunt.dm index f485ae578f..8cf51d45c6 100644 --- a/code/modules/spells/spell_types/ethereal_jaunt.dm +++ b/code/modules/spells/spell_types/ethereal_jaunt.dm @@ -22,14 +22,14 @@ INVOKE_ASYNC(src, .proc/do_jaunt, target) /obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/do_jaunt(mob/living/target) - target.notransform = 1 + target.mob_transforming = 1 var/turf/mobloc = get_turf(target) var/obj/effect/dummy/phased_mob/spell_jaunt/holder = new /obj/effect/dummy/phased_mob/spell_jaunt(mobloc) new jaunt_out_type(mobloc, target.dir) target.ExtinguishMob() target.forceMove(holder) target.reset_perspective(holder) - target.notransform=0 //mob is safely inside holder now, no need for protection. + target.mob_transforming=0 //mob is safely inside holder now, no need for protection. jaunt_steam(mobloc) sleep(jaunt_duration) @@ -102,4 +102,4 @@ return /obj/effect/dummy/phased_mob/spell_jaunt/bullet_act(blah) - return BULLET_ACT_FORCE_PIERCE \ No newline at end of file + return BULLET_ACT_FORCE_PIERCE diff --git a/code/modules/spells/spell_types/rod_form.dm b/code/modules/spells/spell_types/rod_form.dm index 7a96d0ac55..6b974608d6 100644 --- a/code/modules/spells/spell_types/rod_form.dm +++ b/code/modules/spells/spell_types/rod_form.dm @@ -18,7 +18,7 @@ W.damage_bonus += spell_level * 20 //You do more damage when you upgrade the spell W.start_turf = start M.forceMove(W) - M.notransform = 1 + M.mob_transforming = 1 M.status_flags |= GODMODE //Wizard Version of the Immovable Rod @@ -37,7 +37,7 @@ /obj/effect/immovablerod/wizard/Destroy() if(wizard) wizard.status_flags &= ~GODMODE - wizard.notransform = 0 + wizard.mob_transforming = 0 wizard.forceMove(get_turf(src)) return ..() diff --git a/code/modules/spells/spell_types/shapeshift.dm b/code/modules/spells/spell_types/shapeshift.dm index c6966ccee9..a8f9c8bce5 100644 --- a/code/modules/spells/spell_types/shapeshift.dm +++ b/code/modules/spells/spell_types/shapeshift.dm @@ -100,7 +100,7 @@ if(stored.mind) stored.mind.transfer_to(shape) stored.forceMove(src) - stored.notransform = TRUE + stored.mob_transforming = TRUE if(source.convert_damage) var/damage_percent = (stored.maxHealth - stored.health)/stored.maxHealth; var/damapply = damage_percent * shape.maxHealth; @@ -148,7 +148,7 @@ restoring = TRUE qdel(slink) stored.forceMove(get_turf(src)) - stored.notransform = FALSE + stored.mob_transforming = FALSE if(shape.mind) shape.mind.transfer_to(stored) if(death)