From 1336404eb6795ad4be32404a53fede4e8e6f8e18 Mon Sep 17 00:00:00 2001
From: kevinz000 <2003111+kevinz000@users.noreply.github.com>
Date: Wed, 17 Jun 2020 21:37:19 -0700
Subject: [PATCH] last ones
---
.../clock_mobs/clockwork_marauder.dm | 5 +-
code/modules/antagonists/devil/imp/imp.dm | 5 +-
code/modules/antagonists/revenant/revenant.dm | 5 +-
code/modules/holiday/halloween/jacqueen.dm | 5 +-
code/modules/mob/living/carbon/monkey/life.dm | 40 ++++++------
.../mob/living/carbon/monkey/punpun.dm | 5 +-
code/modules/mob/living/life.dm | 3 +-
code/modules/mob/living/silicon/ai/life.dm | 62 +++++++++----------
code/modules/mob/living/silicon/pai/pai.dm | 5 +-
code/modules/mob/living/silicon/robot/life.dm | 7 +--
.../mob/living/simple_animal/astral.dm | 6 +-
.../mob/living/simple_animal/friendly/cat.dm | 14 +++--
.../mob/living/simple_animal/friendly/crab.dm | 5 +-
.../mob/living/simple_animal/friendly/dog.dm | 20 +++---
.../living/simple_animal/guardian/guardian.dm | 2 +-
.../simple_animal/guardian/types/charger.dm | 5 +-
.../simple_animal/guardian/types/fire.dm | 5 +-
.../hostile/mining_mobs/gutlunch.dm | 5 +-
.../simple_animal/hostile/retaliate/clown.dm | 5 +-
.../mob/living/simple_animal/hostile/tree.dm | 5 +-
.../simple_animal/hostile/venus_human_trap.dm | 5 +-
.../simple_animal/hostile/wumborian_fugu.dm | 5 +-
.../mob/living/simple_animal/parrot.dm | 13 ++--
23 files changed, 125 insertions(+), 112 deletions(-)
diff --git a/code/modules/antagonists/clockcult/clock_mobs/clockwork_marauder.dm b/code/modules/antagonists/clockcult/clock_mobs/clockwork_marauder.dm
index dd37f3727c..3bc237fc56 100644
--- a/code/modules/antagonists/clockcult/clock_mobs/clockwork_marauder.dm
+++ b/code/modules/antagonists/clockcult/clock_mobs/clockwork_marauder.dm
@@ -40,8 +40,9 @@
if(!shield_health)
return "Its shield has been destroyed!"
-/mob/living/simple_animal/hostile/clockwork/marauder/Life()
- ..()
+/mob/living/simple_animal/hostile/clockwork/marauder/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
var/turf/T = get_turf(src)
var/turf/open/space/S = isspaceturf(T)? T : null
var/less_space_damage
diff --git a/code/modules/antagonists/devil/imp/imp.dm b/code/modules/antagonists/devil/imp/imp.dm
index 7a6850bfa1..f7f55456f7 100644
--- a/code/modules/antagonists/devil/imp/imp.dm
+++ b/code/modules/antagonists/devil/imp/imp.dm
@@ -48,8 +48,9 @@
..()
boost = world.time + 30
-/mob/living/simple_animal/imp/Life()
- ..()
+/mob/living/simple_animal/imp/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
if(boost= POWER_RESTORATION_SEARCH_APC)
- ai_restore_power()
- return
+ if(aiRestorePowerRoutine >= POWER_RESTORATION_SEARCH_APC)
+ ai_restore_power()
+ return
- else if(!aiRestorePowerRoutine)
- ai_lose_power()
+ else if(!aiRestorePowerRoutine)
+ ai_lose_power()
/mob/living/silicon/ai/proc/lacks_power()
var/turf/T = get_turf(src)
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
index 4b1b108b0e..320e3ecfb9 100644
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -146,10 +146,11 @@
if(possible_chassis[chassis])
AddElement(/datum/element/mob_holder, chassis, 'icons/mob/pai_item_head.dmi', 'icons/mob/pai_item_rh.dmi', 'icons/mob/pai_item_lh.dmi', ITEM_SLOT_HEAD)
-/mob/living/silicon/pai/Life()
+/mob/living/silicon/pai/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
if(hacking)
process_hack()
- return ..()
/mob/living/silicon/pai/proc/process_hack()
diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm
index a5312f94f2..0feb8b98b7 100644
--- a/code/modules/mob/living/silicon/robot/life.dm
+++ b/code/modules/mob/living/silicon/robot/life.dm
@@ -1,9 +1,6 @@
-/mob/living/silicon/robot/Life()
- set invisibility = 0
- if (src.mob_transforming)
+/mob/living/silicon/robot/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
return
-
- ..()
adjustOxyLoss(-10) //we're a robot!
handle_robot_hud_updates()
handle_robot_cell()
diff --git a/code/modules/mob/living/simple_animal/astral.dm b/code/modules/mob/living/simple_animal/astral.dm
index 4fb9e9273e..eee42c214f 100644
--- a/code/modules/mob/living/simple_animal/astral.dm
+++ b/code/modules/mob/living/simple_animal/astral.dm
@@ -62,7 +62,7 @@
log_reagent("FERMICHEM: [src] has astrally transmitted [message] into [A]")
//Delete the mob if there's no mind! Pay that mob no mind.
-/mob/living/simple_animal/astral/Life()
- if(!mind)
- qdel(src)
+/mob/living/simple_animal/astral/PhysicalLife(seconds, times_fired)
. = ..()
+ if(!mind && !QDELETED(src))
+ qdel(src)
diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm
index 5f7ff198e2..d30fa1b49f 100644
--- a/code/modules/mob/living/simple_animal/friendly/cat.dm
+++ b/code/modules/mob/living/simple_animal/friendly/cat.dm
@@ -115,13 +115,14 @@
Read_Memory()
. = ..()
-/mob/living/simple_animal/pet/cat/Runtime/Life()
+/mob/living/simple_animal/pet/cat/Runtime/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
if(!cats_deployed && SSticker.current_state >= GAME_STATE_SETTING_UP)
Deploy_The_Cats()
if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved)
Write_Memory()
memory_saved = TRUE
- ..()
/mob/living/simple_animal/pet/cat/Runtime/make_babies()
var/mob/baby = ..()
@@ -177,7 +178,9 @@
gold_core_spawnable = NO_SPAWN
unique_pet = TRUE
-/mob/living/simple_animal/pet/cat/Life()
+/mob/living/simple_animal/pet/cat/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
if(!stat && !buckled && !client)
if(prob(1))
emote("me", EMOTE_VISIBLE, pick("stretches out for a belly rub.", "wags its tail.", "lies down."))
@@ -269,8 +272,9 @@
to_chat(src, "Your name is now \"new_name\"!")
name = new_name
-/mob/living/simple_animal/pet/cat/cak/Life()
- ..()
+/mob/living/simple_animal/pet/cat/cak/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
if(stat)
return
if(health < maxHealth)
diff --git a/code/modules/mob/living/simple_animal/friendly/crab.dm b/code/modules/mob/living/simple_animal/friendly/crab.dm
index e00e0648b5..7f3693f622 100644
--- a/code/modules/mob/living/simple_animal/friendly/crab.dm
+++ b/code/modules/mob/living/simple_animal/friendly/crab.dm
@@ -27,8 +27,9 @@
var/obj/item/inventory_mask
gold_core_spawnable = FRIENDLY_SPAWN
-/mob/living/simple_animal/crab/Life()
- ..()
+/mob/living/simple_animal/crab/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
//CRAB movement
if(!ckey && !stat)
if(isturf(loc) && !resting && !buckled) //This is so it only moves if it's not inside a closet, gentics machine, etc.
diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm
index 57a4ecc5c9..e054d79248 100644
--- a/code/modules/mob/living/simple_animal/friendly/dog.dm
+++ b/code/modules/mob/living/simple_animal/friendly/dog.dm
@@ -366,11 +366,12 @@
RemoveElement(/datum/element/mob_holder, held_icon)
AddElement(/datum/element/mob_holder, "old_corgi")
-/mob/living/simple_animal/pet/dog/corgi/Ian/Life()
+/mob/living/simple_animal/pet/dog/corgi/Ian/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved)
Write_Memory(FALSE)
memory_saved = TRUE
- ..()
/mob/living/simple_animal/pet/dog/corgi/Ian/death()
if(!memory_saved)
@@ -490,8 +491,9 @@
nofur = TRUE
unique_pet = TRUE
-/mob/living/simple_animal/pet/dog/corgi/narsie/Life()
- ..()
+/mob/living/simple_animal/pet/dog/corgi/narsie/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
for(var/mob/living/simple_animal/pet/P in range(1, src))
if(P != src && prob(5))
visible_message("[src] devours [P]!", \
@@ -615,8 +617,9 @@
return
..()
-/mob/living/simple_animal/pet/dog/corgi/Lisa/Life()
- ..()
+/mob/living/simple_animal/pet/dog/corgi/Lisa/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
make_babies()
@@ -628,8 +631,9 @@
setDir(i)
sleep(1)
-/mob/living/simple_animal/pet/dog/pug/Life()
- ..()
+/mob/living/simple_animal/pet/dog/pug/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
if(!stat && CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND|MOBILITY_MOVE) && !buckled)
if(prob(1))
emote("me", EMOTE_VISIBLE, pick("chases its tail."))
diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm
index 9d94992747..73ebfa7c77 100644
--- a/code/modules/mob/living/simple_animal/guardian/guardian.dm
+++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm
@@ -160,7 +160,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
to_chat(src, "Your new name [new_name] anchors itself in your mind.")
fully_replace_character_name(null, new_name)
-/mob/living/simple_animal/hostile/guardian/Life() //Dies if the summoner dies
+/mob/living/simple_animal/hostile/guardian/PhysicalLife() //Dies if the summoner dies
. = ..()
update_health_hud() //we need to update all of our health displays to match our summoner and we can't practically give the summoner a hook to do it
med_hud_set_health()
diff --git a/code/modules/mob/living/simple_animal/guardian/types/charger.dm b/code/modules/mob/living/simple_animal/guardian/types/charger.dm
index c60e43ff01..0b4952aa9e 100644
--- a/code/modules/mob/living/simple_animal/guardian/types/charger.dm
+++ b/code/modules/mob/living/simple_animal/guardian/types/charger.dm
@@ -11,8 +11,9 @@
var/charging = 0
var/obj/screen/alert/chargealert
-/mob/living/simple_animal/hostile/guardian/charger/Life()
- . = ..()
+/mob/living/simple_animal/hostile/guardian/charger/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
if(ranged_cooldown <= world.time)
if(!chargealert)
chargealert = throw_alert("charge", /obj/screen/alert/cancharge)
diff --git a/code/modules/mob/living/simple_animal/guardian/types/fire.dm b/code/modules/mob/living/simple_animal/guardian/types/fire.dm
index 97003a53e2..a05cd517fb 100644
--- a/code/modules/mob/living/simple_animal/guardian/types/fire.dm
+++ b/code/modules/mob/living/simple_animal/guardian/types/fire.dm
@@ -13,8 +13,9 @@
tech_fluff_string = "Boot sequence complete. Crowd control modules activated. Holoparasite swarm online."
carp_fluff_string = "CARP CARP CARP! You caught one! OH GOD, EVERYTHING'S ON FIRE. Except you and the fish."
-/mob/living/simple_animal/hostile/guardian/fire/Life()
- . = ..()
+/mob/living/simple_animal/hostile/guardian/fire/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
if(summoner)
summoner.ExtinguishMob()
summoner.adjust_fire_stacks(-20)
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/gutlunch.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/gutlunch.dm
index c9e650531c..69d4ebe4df 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/gutlunch.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/gutlunch.dm
@@ -114,8 +114,9 @@
name = "guthen"
gender = FEMALE
-/mob/living/simple_animal/hostile/asteroid/gutlunch/guthen/Life()
- ..()
+/mob/living/simple_animal/hostile/asteroid/gutlunch/guthen/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
if(udder.reagents.total_volume == udder.reagents.maximum_volume) //Only breed when we're full.
make_babies()
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm
index 35f2817028..03aac4037a 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm
@@ -51,8 +51,9 @@
..()
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, TRUE)
-/mob/living/simple_animal/hostile/retaliate/clown/Life()
- . = ..()
+/mob/living/simple_animal/hostile/retaliate/clown/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
if(banana_time && banana_time < world.time)
var/turf/T = get_turf(src)
var/list/adjacent = T.GetAtmosAdjacentTurfs(1)
diff --git a/code/modules/mob/living/simple_animal/hostile/tree.dm b/code/modules/mob/living/simple_animal/hostile/tree.dm
index 3aa3c9e566..f65f1613c9 100644
--- a/code/modules/mob/living/simple_animal/hostile/tree.dm
+++ b/code/modules/mob/living/simple_animal/hostile/tree.dm
@@ -44,8 +44,9 @@
gold_core_spawnable = HOSTILE_SPAWN
del_on_death = 1
-/mob/living/simple_animal/hostile/tree/Life()
- ..()
+/mob/living/simple_animal/hostile/tree/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
if(isopenturf(loc))
var/turf/open/T = src.loc
if(T.air && T.air.gases[/datum/gas/carbon_dioxide])
diff --git a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
index 5111b0b180..fdb088934c 100644
--- a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
+++ b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
@@ -100,8 +100,9 @@
/mob/living/simple_animal/hostile/venus_human_trap/ghost_playable
playable_plant = TRUE //For admins that want to buss some harmless plants
-/mob/living/simple_animal/hostile/venus_human_trap/Life()
- . = ..()
+/mob/living/simple_animal/hostile/venus_human_trap/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
pull_vines()
/mob/living/simple_animal/hostile/venus_human_trap/AttackingTarget()
diff --git a/code/modules/mob/living/simple_animal/hostile/wumborian_fugu.dm b/code/modules/mob/living/simple_animal/hostile/wumborian_fugu.dm
index 5c881a7b0d..dc6154c05e 100644
--- a/code/modules/mob/living/simple_animal/hostile/wumborian_fugu.dm
+++ b/code/modules/mob/living/simple_animal/hostile/wumborian_fugu.dm
@@ -47,12 +47,13 @@
QDEL_NULL(E)
return ..()
-/mob/living/simple_animal/hostile/asteroid/fugu/Life()
+/mob/living/simple_animal/hostile/asteroid/fugu/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
if(!wumbo)
inflate_cooldown = max((inflate_cooldown - 1), 0)
if(target && AIStatus == AI_ON)
E.Activate()
- ..()
/mob/living/simple_animal/hostile/asteroid/fugu/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
if(!forced && wumbo)
diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm
index e8d6411c01..de8a6fb6a0 100644
--- a/code/modules/mob/living/simple_animal/parrot.dm
+++ b/code/modules/mob/living/simple_animal/parrot.dm
@@ -357,9 +357,9 @@
/*
* AI - Not really intelligent, but I'm calling it AI anyway.
*/
-/mob/living/simple_animal/parrot/Life()
- ..()
-
+/mob/living/simple_animal/parrot/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
//Sprite update for when a parrot gets pulled
if(pulledby && !stat && parrot_state != PARROT_WANDER)
if(buckled)
@@ -369,8 +369,6 @@
parrot_state = PARROT_WANDER
pixel_x = initial(pixel_x)
pixel_y = initial(pixel_y)
- return
-
//-----SPEECH
/* Parrot speech mimickry!
@@ -911,11 +909,12 @@
if(. && !client && prob(1) && prob(1)) //Only the one true bird may speak across dimensions.
world.TgsTargetedChatBroadcast("A stray squawk is heard... \"[message]\"", FALSE)
-/mob/living/simple_animal/parrot/Poly/Life()
+/mob/living/simple_animal/parrot/Poly/BiologicalLife(seconds, times_fired)
+ if(!(. = ..()))
+ return
if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved)
Write_Memory(FALSE)
memory_saved = TRUE
- ..()
/mob/living/simple_animal/parrot/Poly/death(gibbed)
if(!memory_saved)