diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm
index dde6ec01bb4..d8b317d1eb6 100644
--- a/code/game/gamemodes/blob/blobs/blob_mobs.dm
+++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm
@@ -87,6 +87,7 @@
loc.visible_message(" The corpse of [H.name] suddenly rises!")
/mob/living/simple_animal/hostile/blob/blobspore/death(gibbed)
+ ..(1)
// On death, create a small smoke of harmful gas (s-Acid)
var/datum/effect/effect/system/chem_smoke_spread/S = new
var/turf/location = get_turf(src)
@@ -104,6 +105,7 @@
S.set_up(reagents, 1, 1, location, 15, 1) // only 1-2 smoke cloud
S.start()
+ ghostize()
qdel(src)
/mob/living/simple_animal/hostile/blob/blobspore/Destroy()
diff --git a/code/game/machinery/computer/shuttle.dm b/code/game/machinery/computer/shuttle.dm
index a6ca46fdac5..8d6f77e4a39 100644
--- a/code/game/machinery/computer/shuttle.dm
+++ b/code/game/machinery/computer/shuttle.dm
@@ -92,7 +92,7 @@
else if(istype(A, /mob/living)) // You Shall Not Pass!
var/mob/living/M = A
- if(!M.lying && !istype(M, /mob/living/carbon/monkey) && !istype(M, /mob/living/simple_animal/slime)) //If your not laying down, or a small creature, no pass.
+ if(!M.lying && !ismonkey(M) && !isslime(M)) //If your not laying down, or a small creature, no pass.
return 0
return ..()
diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm
index 6fa7f816840..ffc4db6400c 100644
--- a/code/game/objects/buckling.dm
+++ b/code/game/objects/buckling.dm
@@ -34,7 +34,7 @@
if(!can_buckle || !istype(M) || (M.loc != loc) || M.buckled || (buckle_requires_restraints && !M.restrained()))
return 0
- if (istype(M, /mob/living/simple_animal/slime) || istype(M, /mob/living/simple_animal/slime))
+ if (isslime(M))
return 0
M.buckled = src
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 2cded397e04..8c9762f053c 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -336,7 +336,7 @@
user << "You're going to need to remove that mask/helmet/glasses first."
return
- if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/simple_animal/slime))//Aliens don't have eyes./N slimes also don't have eyes!
+ if(isalien(M))//Aliens don't have eyes./N slimes also don't have eyes!
user << "You cannot locate any eyes on this creature!"
return
diff --git a/code/modules/food&drinks/food/snacks.dm b/code/modules/food&drinks/food/snacks.dm
index 4f2576ec72e..3199cde393a 100644
--- a/code/modules/food&drinks/food/snacks.dm
+++ b/code/modules/food&drinks/food/snacks.dm
@@ -51,7 +51,7 @@
M.unEquip(src) //so icons update :[
qdel(src)
return 0
- if(istype(M, /mob/living/carbon))
+ if(iscarbon(M))
if(!canconsume(M, user))
return 0
@@ -79,7 +79,7 @@
M << "You cannot force any more of \the [src] to go down your throat."
return 0
else
- if(! (isslime(M) || isbrain(M)) ) //If you're feeding it to someone else.
+ if(!isbrain(M)) //If you're feeding it to someone else.
if(wrapped)
return 0
if(fullness <= (600 * (1 + M.overeatduration / 1000)))
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index af4e92ac905..8ad4fa5796c 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -442,10 +442,10 @@ Sorry Giacom. Please don't be mad :(
C.reagents.clear_reagents()
for(var/datum/disease/D in viruses)
D.cure(0)
- if(stat == 2)
+ if(stat == DEAD)
dead_mob_list -= src
living_mob_list += src
- if(!isanimal(src)) stat = CONSCIOUS
+ stat = CONSCIOUS
if(ishuman(src))
var/mob/living/carbon/human/human_mob = src
human_mob.restore_blood()
@@ -453,8 +453,7 @@ Sorry Giacom. Please don't be mad :(
update_fire()
regenerate_icons()
- ..()
- return
+
/mob/living/proc/update_damage_overlays()
return
@@ -906,4 +905,4 @@ Sorry Giacom. Please don't be mad :(
else
loc_temp = environment.temperature
- return loc_temp
+ return loc_temp
diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm
index 8f00dc6ea8a..4005451ecc9 100644
--- a/code/modules/mob/living/simple_animal/constructs.dm
+++ b/code/modules/mob/living/simple_animal/constructs.dm
@@ -7,7 +7,6 @@
response_help = "thinks better of touching"
response_disarm = "flails at"
response_harm = "punches"
- icon_dead = "shade_dead"
icon = 'icons/mob/mob.dmi'
speed = 0
a_intent = "harm"
@@ -28,7 +27,7 @@
mob_spell_list += new spell(src)
/mob/living/simple_animal/construct/death()
- ..()
+ ..(1)
new /obj/item/weapon/ectoplasm (src.loc)
visible_message("[src] collapses in a shattered heap.")
ghostize()
@@ -50,7 +49,7 @@
/mob/living/simple_animal/construct/attack_animal(mob/living/simple_animal/M as mob)
if(istype(M, /mob/living/simple_animal/construct/builder))
- health += 5
+ adjustBruteLoss(-5)
M.emote("me", 1, "mends some of \the [src]'s wounds.")
else if(src != M)
..()
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm b/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm
index 1a9dfb7db3e..d5d8cf19f5c 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm
@@ -94,7 +94,8 @@
if(health < health_repair_max)
user << "You start to tighten loose screws on [src]."
if(do_after(user,80))
- health = health_repair_max
+ var/repair = health_repair_max - health
+ adjustBruteLoss(-repair)
visible_message("[user] tightens [src == user ? "their" : "[src]'s"] loose screws!")
else
user << "You need to remain still to tighten [src]'s screws."
diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm
index cd1e0366632..38e9f399ae1 100644
--- a/code/modules/mob/living/simple_animal/friendly/mouse.dm
+++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm
@@ -39,11 +39,13 @@
death()
/mob/living/simple_animal/mouse/death(gibbed)
- ..(gibbed)
if(!ckey)
+ ..(1)
var/obj/item/trash/deadmouse/M = new(src.loc)
- M.icon_state = src.icon_dead
+ M.icon_state = icon_dead
qdel(src)
+ else
+ ..(gibbed)
/mob/living/simple_animal/mouse/Crossed(AM as mob|obj)
if( ishuman(AM) )
diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm
index 1598ca78bc7..0af9b62a638 100644
--- a/code/modules/mob/living/simple_animal/hostile/alien.dm
+++ b/code/modules/mob/living/simple_animal/hostile/alien.dm
@@ -26,6 +26,8 @@
faction = list("alien")
status_flags = CANPUSH
minbodytemp = 0
+ see_in_dark = 8
+ see_invisible = SEE_INVISIBLE_MINIMUM
/mob/living/simple_animal/hostile/alien/drone
name = "alien drone"
diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm
index f5907498997..31316587039 100644
--- a/code/modules/mob/living/simple_animal/hostile/bees.dm
+++ b/code/modules/mob/living/simple_animal/hostile/bees.dm
@@ -3,7 +3,6 @@
desc = ""
icon_state = "bee_1"
icon_living = "bee"
- icon_dead = ""
speak_emote = list("buzzes")
emote_hear = list("buzzes")
turns_per_move = 0
@@ -34,7 +33,8 @@
update_bees()
/mob/living/simple_animal/hostile/poison/bees/death(gibbed)
- ..(gibbed)
+ ..(1)
+ ghostize()
qdel(src)
return
diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm
index 819ca1d98ce..651ed536c0d 100644
--- a/code/modules/mob/living/simple_animal/hostile/carp.dm
+++ b/code/modules/mob/living/simple_animal/hostile/carp.dm
@@ -51,6 +51,8 @@
maxbodytemp = INFINITY
/mob/living/simple_animal/hostile/carp/holocarp/death()
+ ..(1)
+ ghostize()
qdel(src)
return
diff --git a/code/modules/mob/living/simple_animal/hostile/eyeballs.dm b/code/modules/mob/living/simple_animal/hostile/eyeballs.dm
index 4bebf1eaa72..313798c6b22 100644
--- a/code/modules/mob/living/simple_animal/hostile/eyeballs.dm
+++ b/code/modules/mob/living/simple_animal/hostile/eyeballs.dm
@@ -5,7 +5,6 @@
desc = "An odd looking creature, it won't stop staring..."
icon_state = "eyeball"
icon_living = "eyeball"
- icon_dead = ""
icon_gib = ""
meat_type = null
meat_amount = 0
@@ -30,5 +29,6 @@
emote("me", 1, "glares at [.]")
/mob/living/simple_animal/hostile/carp/eyeball/death()
+ ..(1)
+ ghostize()
qdel(src)
- return
\ No newline at end of file
diff --git a/code/modules/mob/living/simple_animal/hostile/hivebot.dm b/code/modules/mob/living/simple_animal/hostile/hivebot.dm
index cd357f5b84e..b79fecee6ef 100644
--- a/code/modules/mob/living/simple_animal/hostile/hivebot.dm
+++ b/code/modules/mob/living/simple_animal/hostile/hivebot.dm
@@ -40,12 +40,13 @@
ranged = 1
/mob/living/simple_animal/hostile/hivebot/death(gibbed)
- ..(gibbed)
- visible_message("[src] blows apart!")
+ ..(1)
+ visible_message("[src] blows apart!")
new /obj/effect/decal/cleanable/robot_debris(src.loc)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
+ ghostize()
qdel(src)
return
@@ -65,38 +66,35 @@
var/spawn_delay = 600
var/turn_on = 0
var/auto_spawn = 1
- proc
- warpbots()
+
+/mob/living/simple_animal/hostile/hivebot/tele/New()
+ ..()
+ var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
+ smoke.set_up(5, 0, src.loc)
+ smoke.start()
+ visible_message("The [src] warps in!")
+ playsound(src.loc, 'sound/effects/EMPulse.ogg', 25, 1)
+
+/mob/living/simple_animal/hostile/hivebot/tele/proc/warpbots()
+ icon_state = "def_radar"
+ visible_message("The [src] turns on!")
+ while(bot_amt > 0)
+ bot_amt--
+ switch(bot_type)
+ if("norm")
+ new /mob/living/simple_animal/hostile/hivebot(get_turf(src))
+ if("range")
+ new /mob/living/simple_animal/hostile/hivebot/range(get_turf(src))
+ if("rapid")
+ new /mob/living/simple_animal/hostile/hivebot/rapid(get_turf(src))
+ spawn(100)
+ qdel(src)
+ return
- New()
- ..()
- var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
- smoke.set_up(5, 0, src.loc)
- smoke.start()
- visible_message("The [src] warps in!")
- playsound(src.loc, 'sound/effects/EMPulse.ogg', 25, 1)
-
- warpbots()
- icon_state = "def_radar"
- visible_message("The [src] turns on!")
- while(bot_amt > 0)
- bot_amt--
- switch(bot_type)
- if("norm")
- new /mob/living/simple_animal/hostile/hivebot(get_turf(src))
- if("range")
- new /mob/living/simple_animal/hostile/hivebot/range(get_turf(src))
- if("rapid")
- new /mob/living/simple_animal/hostile/hivebot/rapid(get_turf(src))
- spawn(100)
- qdel(src)
- return
-
-
- Life()
- ..()
- if(stat == 0)
- if(prob(2))//Might be a bit low, will mess with it likely
- warpbots()
+/mob/living/simple_animal/hostile/hivebot/tele/Life()
+ ..()
+ if(stat == 0)
+ if(prob(2))//Might be a bit low, will mess with it likely
+ warpbots()
diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm
index e4d98981ad3..85089cae53c 100644
--- a/code/modules/mob/living/simple_animal/hostile/mimic.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm
@@ -34,9 +34,10 @@
if(.)
emote("me", 1, "[Attackemote] [.].")
-/mob/living/simple_animal/hostile/mimic/death(gibbed)
- ..(gibbed)
- visible_message("[src] stops moving!")
+/mob/living/simple_animal/hostile/mimic/death()
+ ..(1)
+ visible_message("[src] stops moving!")
+ ghostize()
qdel(src)
@@ -100,13 +101,13 @@
..()
icon_state = initial(icon_state)
-/mob/living/simple_animal/hostile/mimic/crate/death(gibbed)
+/mob/living/simple_animal/hostile/mimic/crate/death()
var/obj/structure/closet/crate/C = new(get_turf(src))
// Put loot in crate
for(var/obj/O in src)
O.loc = C
- ..(gibbed)
+ ..()
/mob/living/simple_animal/hostile/mimic/crate/AttackingTarget()
. =..()
@@ -139,11 +140,11 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
for(var/mob/living/M in contents) //a fix for animated statues from the flesh to stone spell
death()
-/mob/living/simple_animal/hostile/mimic/copy/death(gibbed)
+/mob/living/simple_animal/hostile/mimic/copy/death()
for(var/atom/movable/M in src)
M.loc = get_turf(src)
- ..(gibbed)
+ ..()
/mob/living/simple_animal/hostile/mimic/copy/ListTargets()
// Return a list of targets that isn't the creator
diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm
index f06f3d4c28c..aacc4da57f3 100644
--- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm
@@ -42,7 +42,7 @@
/mob/living/simple_animal/hostile/mushroom/Life()
..()
if(!stat)//Mushrooms slowly regenerate if conscious, for people who want to save them from being eaten
- health = min(health+2, maxHealth)
+ adjustBruteLoss(-2)
/mob/living/simple_animal/hostile/mushroom/New()//Makes every shroom a little unique
melee_damage_lower += rand(3, 5)
@@ -78,7 +78,7 @@
if(level_gain < 1)//So we still gain a level if two mushrooms were the same level
level_gain = 1
M.LevelUp(level_gain)
- M.health = M.maxHealth
+ M.adjustBruteLoss(-M.maxHealth)
qdel(src)
..()
@@ -88,7 +88,8 @@
UpdateMushroomCap()
/mob/living/simple_animal/hostile/mushroom/death(gibbed)
- visible_message("[src] fainted.")
+ if(!gibbed)
+ visible_message("[src] fainted.")
..(gibbed)
UpdateMushroomCap()
@@ -101,9 +102,8 @@
/mob/living/simple_animal/hostile/mushroom/proc/Recover()
visible_message("[src] slowly begins to recover.")
- health = 5
faint_ticker = 0
- icon_state = icon_living
+ revive()
UpdateMushroomCap()
recovery_cooldown = 1
spawn(300)
@@ -117,7 +117,7 @@
else
melee_damage_upper += (level_gain * rand(1,5))
maxHealth += (level_gain * rand(1,5))
- health = maxHealth //They'll always heal, even if they don't gain a level, in case you want to keep this shroom around instead of harvesting it
+ adjustBruteLoss(-maxHealth) //They'll always heal, even if they don't gain a level, in case you want to keep this shroom around instead of harvesting it
/mob/living/simple_animal/hostile/mushroom/proc/Bruise()
if(!bruised && !stat)
diff --git a/code/modules/mob/living/simple_animal/hostile/pirate.dm b/code/modules/mob/living/simple_animal/hostile/pirate.dm
index 1e1fd61c691..2bd4ffb6341 100644
--- a/code/modules/mob/living/simple_animal/hostile/pirate.dm
+++ b/code/modules/mob/living/simple_animal/hostile/pirate.dm
@@ -42,11 +42,13 @@
weapon1 = /obj/item/weapon/gun/energy/laser
-/mob/living/simple_animal/hostile/pirate/death(gibbed)
- ..(gibbed)
+/mob/living/simple_animal/hostile/pirate/death()
+ ..(1)
+ visible_message("[src] stops moving.")
if(corpse)
new corpse (src.loc)
if(weapon1)
new weapon1 (src.loc)
+ ghostize()
qdel(src)
return
\ No newline at end of file
diff --git a/code/modules/mob/living/simple_animal/hostile/russian.dm b/code/modules/mob/living/simple_animal/hostile/russian.dm
index c98022a10cd..1f96f9533a4 100644
--- a/code/modules/mob/living/simple_animal/hostile/russian.dm
+++ b/code/modules/mob/living/simple_animal/hostile/russian.dm
@@ -45,10 +45,12 @@
casingtype = /obj/item/ammo_casing/a762
/mob/living/simple_animal/hostile/russian/death(gibbed)
- ..(gibbed)
+ ..(1)
+ visible_message("[src] stops moving.")
if(corpse)
new corpse (src.loc)
if(weapon1)
new weapon1 (src.loc)
+ ghostize()
qdel(src)
return
diff --git a/code/modules/mob/living/simple_animal/hostile/tree.dm b/code/modules/mob/living/simple_animal/hostile/tree.dm
index 0205b68df60..79edd57a33f 100644
--- a/code/modules/mob/living/simple_animal/hostile/tree.dm
+++ b/code/modules/mob/living/simple_animal/hostile/tree.dm
@@ -29,6 +29,7 @@
minbodytemp = 0
faction = list("hostile")
+ var/drop_type = /obj/item/stack/sheet/mineral/wood
/mob/living/simple_animal/hostile/tree/FindTarget()
. = ..()
@@ -44,9 +45,10 @@
L.visible_message("\The [src] knocks down \the [L]!")
/mob/living/simple_animal/hostile/tree/death(gibbed)
- ..(gibbed)
- visible_message("[src] is hacked into pieces!")
- new /obj/item/stack/sheet/mineral/wood(loc)
+ ..(1)
+ visible_message("[src] is hacked into pieces!")
+ new drop_type(loc)
+ ghostize()
qdel(src)
/mob/living/simple_animal/hostile/tree/festivus
@@ -56,9 +58,5 @@
icon_living = "festivus_pole"
icon_dead = "festivus_pole"
icon_gib = "festivus_pole"
+ drop_type = /obj/item/stack/rods
-/mob/living/simple_animal/hostile/tree/festivus/death(gibbed)
- ..(gibbed)
- visible_message("[src] is hacked into pieces!")
- new /obj/item/stack/rods(loc)
- qdel(src)
diff --git a/code/modules/mob/living/simple_animal/shade.dm b/code/modules/mob/living/simple_animal/shade.dm
index e70e6560b33..a1982d4d0bd 100644
--- a/code/modules/mob/living/simple_animal/shade.dm
+++ b/code/modules/mob/living/simple_animal/shade.dm
@@ -5,7 +5,6 @@
icon = 'icons/mob/mob.dmi'
icon_state = "shade"
icon_living = "shade"
- icon_dead = "shade_dead"
maxHealth = 50
health = 50
speak_emote = list("hisses")
@@ -27,6 +26,7 @@
/mob/living/simple_animal/shade/death()
+ ..(1)
new /obj/item/weapon/ectoplasm (src.loc)
visible_message("[src] lets out a contented sigh as their form unwinds.")
ghostize()
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index 2a9e60ce9e3..00307a9d306 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -37,7 +37,7 @@
var/maxbodytemp = 350
//Atmos effect - Yes, you can make creatures that require plasma or co2 to survive. N2O is a trace gas and handled separately, hence why it isn't here. It'd be hard to add it. Hard and me don't mix (Yes, yes make all the dick jokes you want with that.) - Errorage
- var/list/atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0) //Leaving something at 0 means it's off - has no maximum
+ var/list/atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0) //Leaving something at 0 means it's off - has no maximum
var/unsuitable_atmos_damage = 2 //This damage is taken when atmos doesn't fit all the requirements above
//LETTING SIMPLE ANIMALS ATTACK? WHAT COULD GO WRONG. Defaults to zero so Ian can still be cuddly
@@ -71,10 +71,7 @@
..()
/mob/living/simple_animal/updatehealth()
- if(health > maxHealth)
- health = maxHealth
- ..()
- return
+ health = max(maxHealth - getBruteLoss(), 0)
/mob/living/simple_animal/Life()
if(..())
@@ -85,7 +82,7 @@
return 1
/mob/living/simple_animal/handle_regular_status_updates()
- if(..())
+ if(..()) //alive
if(health < 1)
death()
@@ -269,7 +266,7 @@
M.do_attack_animation(src)
visible_message("[M] [response_harm] [src]!")
playsound(loc, "punch", 25, 1, -1)
- adjustBruteLoss(harm_intent_damage)
+ attack_threshold_check(harm_intent_damage)
add_logs(M, src, "attacked", admin=0)
updatehealth()
return 1
@@ -313,9 +310,9 @@
/mob/living/simple_animal/attack_slime(mob/living/simple_animal/slime/M as mob)
if(..()) //successful slime attack
- var/damage = rand(5, 30)
+ var/damage = rand(15, 25)
if(M.is_adult)
- damage = rand(10, 40)
+ damage = rand(20, 35)
attack_threshold_check(damage)
return 1
@@ -381,6 +378,7 @@
health = 0
icon_state = icon_dead
stat = DEAD
+ density = 0
lying = 1
if(!gibbed)
visible_message("\the [src] stops moving...")
@@ -425,6 +423,10 @@
/mob/living/simple_animal/revive()
health = maxHealth
+ icon_state = icon_living
+ lying = 0
+ density = 1
+ update_canmove()
..()
/mob/living/simple_animal/proc/make_babies() // <3 <3 <3
diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm
index bff37ced643..904803ff26c 100644
--- a/code/modules/mob/living/simple_animal/slime/life.dm
+++ b/code/modules/mob/living/simple_animal/slime/life.dm
@@ -101,7 +101,6 @@
/mob/living/simple_animal/slime/handle_environment(datum/gas_mixture/environment)
if(!environment)
- adjustToxLoss(rand(10,20))
return
//var/environment_heat_capacity = environment.heat_capacity()
@@ -120,9 +119,9 @@
if(bodytemperature <= (T0C - 50)) // hurt temperature
if(bodytemperature <= 50) // sqrting negative numbers is bad
- adjustToxLoss(200)
+ adjustBruteLoss(200)
else
- adjustToxLoss(round(sqrt(bodytemperature)) * 2)
+ adjustBruteLoss(round(sqrt(bodytemperature)) * 2)
else
Tempstun = 0
@@ -165,10 +164,6 @@
if(..())
if(prob(30))
- adjustOxyLoss(-1)
- adjustToxLoss(-1)
- adjustFireLoss(-1)
- adjustCloneLoss(-1)
adjustBruteLoss(-1)
/mob/living/simple_animal/slime/proc/handle_nutrition()
@@ -183,7 +178,7 @@
if(nutrition <= 0)
nutrition = 0
if(prob(75))
- adjustToxLoss(rand(0,5))
+ adjustBruteLoss(rand(0,5))
else if (nutrition >= get_grow_nutrition() && amount_grown < 10)
nutrition -= 20
@@ -203,7 +198,7 @@
powerlevel++
if(powerlevel > 10)
powerlevel = 10
- adjustToxLoss(-10)
+ adjustBruteLoss(-10)
@@ -327,13 +322,12 @@
AIprocess()
/mob/living/simple_animal/slime/handle_automated_movement()
- return //slime random movement is currently handled in handle_target()
+ return //slime random movement is currently handled in handle_targets()
/mob/living/simple_animal/slime/handle_automated_speech()
return //slime random speech is currently handled in handle_speech()
/mob/living/simple_animal/slime/proc/handle_mood()
- //Mood starts here
var/newmood = ""
if (rabid || attacked)
newmood = "angry"
@@ -349,7 +343,8 @@
newmood = pick("sad", ":3", "pout")
if ((mood == "sad" || mood == ":3" || mood == "pout") && !newmood)
- if (prob(75)) newmood = mood
+ if(prob(75))
+ newmood = mood
if (newmood != mood) // This is so we don't redraw them every time
mood = newmood
@@ -432,17 +427,17 @@
emote(pick("bounce","sway","light","vibrate","jiggle"))
else
var/t = 10
- var/slimes_near = -1 // Don't count myself
+ var/slimes_near = 0
var/dead_slimes = 0
var/friends_near = list()
- for (var/mob/living/carbon/M in view(7,src))
- if (isslime(M))
+ for (var/mob/living/L in view(7,src))
+ if(isslime(L) && L != src)
++slimes_near
- if (M.stat == DEAD)
+ if (L.stat == DEAD)
++dead_slimes
- if (M in Friends)
+ if (L in Friends)
t += 20
- friends_near += M
+ friends_near += L
if (nutrition < get_hunger_nutrition()) t += 10
if (nutrition < get_starve_nutrition()) t += 10
if (prob(2) && prob(t))
@@ -468,12 +463,12 @@
phrases += "Purr..."
if (attacked)
phrases += "Grrr..."
- if (getToxLoss() > 30)
+ if (bodytemperature < T0C)
phrases += "Cold..."
- if (getToxLoss() > 60)
+ if (bodytemperature < T0C - 30)
phrases += "So... cold..."
phrases += "Very... cold..."
- if (getToxLoss() > 90)
+ if (bodytemperature < T0C - 50)
phrases += "..."
phrases += "C... c..."
if (Victim)
diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm
index d922d207313..e39b9400dfd 100644
--- a/code/modules/mob/living/simple_animal/slime/powers.dm
+++ b/code/modules/mob/living/simple_animal/slime/powers.dm
@@ -1,6 +1,25 @@
/mob/living/simple_animal/slime/verb/Feed()
set category = "Slime"
set desc = "This will let you feed on any valid creature in the surrounding area. This should also be used to halt the feeding process."
+
+ if(stat)
+ return 0
+
+ var/list/choices = list()
+ for(var/mob/living/C in view(1,src))
+ if(C!=src && !isslime(C) && Adjacent(C))
+ choices += C
+
+ var/mob/living/M = input(src,"Who do you wish to feed on?") in null|choices
+ if(!M) return 0
+ if(CanFeedon(M))
+ Feedon(M)
+ return 1
+
+/mob/living/simple_animal/slime/proc/CanFeedon(var/mob/living/M)
+ if(!Adjacent(M))
+ return 0
+
if(Victim)
Feedstop()
return 0
@@ -13,64 +32,35 @@
src << "I must be conscious to do this..."
return 0
- var/list/choices = list()
- for(var/mob/living/C in view(1,src))
- if(C!=src && !istype(C,/mob/living/simple_animal/slime) && Adjacent(C))
- choices += C
+ if(M.stat == DEAD)
+ src << "This subject does not have a strong enough life energy..."
+ return 0
- var/mob/living/M = input(src,"Who do you wish to feed on?") in null|choices
- if(!M) return 0
- if(Adjacent(M))
-
- if(istype(M, /mob/living/carbon/brain))
- src << "This subject does not have an edible life energy..."
+ for(var/mob/living/simple_animal/slime/met in view())
+ if(met.Victim == M && met != src)
+ src << "The [met.name] is already feeding on this subject..."
return 0
-
- if(istype(M, /mob/living/carbon) && (M.health < -70))
- src << "This subject does not have a strong enough life energy..."
- return 0
-
- if(istype(M, /mob/living/simple_animal) && (M.health < 1))//animals don't go into crit, stupid; fixes infinite energy exploit
- src << "This subject does not have a strong enough life energy..."
- return 0
-
- for(var/mob/living/simple_animal/slime/met in view())
- if(met.Victim == M && met != src)
- src << "The [met.name] is already feeding on this subject..."
- return 0
-
- src << "I have latched onto the subject and begun feeding..."
- M << "The [src.name] has latched onto your head!"
-
- Feedon(M)
- return 1
-
+ return 1
/mob/living/simple_animal/slime/proc/Feedon(var/mob/living/M)
+
+ src << "I have latched onto the subject and begun feeding..."
+ M << "The [name] has latched onto [M.name]!"
+
Victim = M
src.loc = M.loc
canmove = 0
anchored = 1
var/lastnut = nutrition
var/fed_succesfully = 0
- var/health_minimum = -70
- if(is_adult)
- icon_state = "[colour] adult slime eat"
- else
- icon_state = "[colour] baby slime eat"
-
-
- if(istype(Victim, /mob/living/simple_animal))
- health_minimum = 0
-
- while(Victim && Victim.health > health_minimum && stat != 2)
+ while(Victim && Victim == M && Victim.stat != DEAD && stat != DEAD)
canmove = 0
if(Adjacent(Victim))
loc = M.loc
- if(istype(Victim, /mob/living/carbon))
+ if(iscarbon(Victim))
Victim.adjustCloneLoss(rand(5,6))
Victim.adjustToxLoss(rand(1,2))
if(Victim.health <= 0)
@@ -87,12 +77,12 @@
fed_succesfully = 1
- else if(health_minimum == 0) //we already know it's a simple_animal from above
+ else if(isanimal(Victim)) //we already know it's a simple_animal from above
Victim.adjustBruteLoss(is_adult ? rand(7, 15) : rand(4, 12))
fed_succesfully = 1
else
- src << "[pick("This subject is incompatable", \
+ src << "[pick("This subject is incompatible", \
"This subject does not have a life energy", "This subject is empty", \
"I am not satisified", "I can not feed from this subject", \
"I do not feel nourished", "This subject is not food")]..."
@@ -101,10 +91,7 @@
add_nutrition(rand(15,30), lastnut)
//Heal yourself.
- adjustOxyLoss(-10)
adjustBruteLoss(-10)
- adjustFireLoss(-10)
- adjustCloneLoss(-10)
updatehealth()
if(Victim)
@@ -115,53 +102,36 @@
else
break
- if(stat == 2) //why the fuck are you doing icon updating here
- if(!is_adult)
- icon_state = "[colour] baby slime dead"
-
- else
- if(is_adult)
- icon_state = "[colour] adult slime"
- else
- icon_state = "[colour] baby slime"
-
canmove = 1
anchored = 0
- if(M)
- if(M.health < health_minimum)
- M.canmove = 0
- if(!client)
- if(Victim && !rabid && !attacked)
- if(Victim.LAssailant && Victim.LAssailant != Victim)
- if(prob(50))
- if(!(Victim.LAssailant in Friends))
- Friends[Victim.LAssailant] = 1
- //Friends.Add(Victim.LAssailant) // no idea why i was using the |= operator
- else
- ++Friends[Victim.LAssailant]
+ if(M && M.stat == DEAD)
+ if(!client)
+ if(Victim && !rabid && !attacked)
+ if(Victim.LAssailant && Victim.LAssailant != Victim)
+ if(prob(50))
+ if(!(Victim.LAssailant in Friends))
+ Friends[Victim.LAssailant] = 1
+ else
+ ++Friends[Victim.LAssailant]
- if(M.client && istype(src, /mob/living/carbon/human))
- if(prob(85))
- rabid = 1 // UUUNNBGHHHH GONNA EAT JUUUUUU
+ if(M.client && ishuman(M))
+ if(prob(85))
+ rabid = 1 // UUUNNBGHHHH GONNA EAT JUUUUUU
- if(client)
- src << "This subject does not have a strong enough life energy anymore..."
- else
- M.canmove = 1
-
- if(client)
- src << "I have stopped feeding..."
- else
if(client)
- src << "I have stopped feeding..."
+ src << "This subject does not have a strong enough life energy anymore..."
+
+ else if(client)
+ src << "I have stopped feeding..."
Victim = null
/mob/living/simple_animal/slime/proc/Feedstop()
if(Victim)
- if(Victim.client) Victim << "[src] has let go of your head!"
+ if(Victim.client)
+ Victim << "[src] has let go of your head!"
Victim = null
/mob/living/simple_animal/slime/proc/UpdateFeed(var/mob/M)
diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm
index 00ef4a9e0a8..ed1cae9ac7b 100644
--- a/code/modules/mob/living/simple_animal/slime/slime.dm
+++ b/code/modules/mob/living/simple_animal/slime/slime.dm
@@ -20,6 +20,8 @@
layer = 5
+ atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
+
maxHealth = 150
health = 150
gender = NEUTER
@@ -84,11 +86,15 @@
..()
/mob/living/simple_animal/slime/regenerate_icons()
- icon_state = "[colour] [is_adult ? "adult" : "baby"] slime"
- icon_dead = "[icon_state] dead"
overlays.len = 0
- if(mood)
- overlays += image('icons/mob/slimes.dmi', icon_state = "aslime-[mood]")
+ var/icon_text = "[colour] [is_adult ? "adult" : "baby"] slime"
+ icon_dead = "[icon_text] dead"
+ if(stat != DEAD)
+ icon_state = icon_text
+ if(mood)
+ overlays += image('icons/mob/slimes.dmi', icon_state = "aslime-[mood]")
+ else
+ icon_state = icon_dead
..()
/mob/living/simple_animal/slime/movement_delay()
@@ -158,29 +164,25 @@
stat(null,"Power Level: [powerlevel]")
-/mob/living/simple_animal/slime/adjustFireLoss(amount)
- ..(-abs(amount)) // Heals them
- return
-
/mob/living/simple_animal/slime/bullet_act(var/obj/item/projectile/Proj)
+ if(!Proj)
+ return
attacked += 10
- ..(Proj)
+ if((Proj.damage_type == BURN))
+ adjustBruteLoss(-abs(Proj.damage)) //fire projectiles heals slimes.
+ Proj.on_hit(src, 0)
+ else
+ ..(Proj)
return 0
/mob/living/simple_animal/slime/emp_act(severity)
powerlevel = 0 // oh no, the power!
..()
-/mob/living/simple_animal/slime/ex_act(severity, target)
- if (severity == 2.0)
- adjustFireLoss(60)
- ..()
-
-
/mob/living/simple_animal/slime/MouseDrop(var/atom/movable/A as mob|obj)
- if(isliving(A) && A != src && usr == src)
+ if(isliving(A) && A != src)
var/mob/living/Food = A
- if(Food.Adjacent(src) && !stat && Food.stat != DEAD) //messy
+ if(CanFeedon(Food))
Feedon(Food)
..()
@@ -195,16 +197,18 @@
/mob/living/simple_animal/slime/attack_slime(mob/living/simple_animal/slime/M as mob)
if(..()) //successful slime attack
+ if(M == src)
+ return
if(Victim)
Victim = null
visible_message("[M] pulls [src] off!")
return
attacked += 5
if(nutrition >= 100) //steal some nutrition. negval handled in life()
- nutrition -= (50 + (5 * M.amount_grown))
- M.add_nutrition(50 + (5 * M.amount_grown))
+ nutrition -= (50 + (40 * M.is_adult))
+ M.add_nutrition(50 + (40 * M.is_adult))
if(health > 0)
- M.adjustBruteLoss(-4 + (-2 * M.amount_grown))
+ M.adjustBruteLoss(-10 + (-10 * M.is_adult))
M.updatehealth()
/mob/living/simple_animal/slime/attack_animal(mob/living/simple_animal/M as mob)
@@ -222,7 +226,7 @@
/mob/living/simple_animal/slime/attack_hulk(mob/living/carbon/human/user)
if(user.a_intent == "harm")
- adjustBruteLoss(5)
+ adjustBruteLoss(10)
discipline_slime(user)
@@ -301,7 +305,7 @@
return
/mob/living/simple_animal/slime/proc/apply_water()
- adjustToxLoss(rand(15,20))
+ adjustBruteLoss(rand(15,20))
if(!client)
if(Target) // Like cats
Target = null
@@ -376,4 +380,3 @@
/mob/living/simple_animal/slime/pet
docile = 1
-
diff --git a/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Food-Reagents.dm b/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Food-Reagents.dm
index b01b5234b98..504f23c54c7 100644
--- a/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Food-Reagents.dm
+++ b/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Food-Reagents.dm
@@ -100,15 +100,15 @@ datum/reagent/consumable/capsaicin/on_mob_life(var/mob/living/M as mob)
M.bodytemperature += 5 * TEMPERATURE_DAMAGE_COEFFICIENT
if(holder.has_reagent("cryostylane"))
holder.remove_reagent("cryostylane", 5)
- if(istype(M, /mob/living/simple_animal/slime))
+ if(isslime(M))
M.bodytemperature += rand(5,20)
if(15 to 25)
M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT
- if(istype(M, /mob/living/simple_animal/slime))
+ if(isslime(M))
M.bodytemperature += rand(10,20)
if(25 to INFINITY)
M.bodytemperature += 15 * TEMPERATURE_DAMAGE_COEFFICIENT
- if(istype(M, /mob/living/simple_animal/slime))
+ if(isslime(M))
M.bodytemperature += rand(15,20)
..()
return
@@ -125,17 +125,17 @@ datum/reagent/consumable/frostoil/on_mob_life(var/mob/living/M as mob)
M.bodytemperature -= 10 * TEMPERATURE_DAMAGE_COEFFICIENT
if(holder.has_reagent("capsaicin"))
holder.remove_reagent("capsaicin", 5)
- if(istype(M, /mob/living/simple_animal/slime))
+ if(isslime(M))
M.bodytemperature -= rand(5,20)
if(15 to 25)
M.bodytemperature -= 15 * TEMPERATURE_DAMAGE_COEFFICIENT
- if(istype(M, /mob/living/simple_animal/slime))
+ if(isslime(M))
M.bodytemperature -= rand(10,20)
if(25 to INFINITY)
M.bodytemperature -= 20 * TEMPERATURE_DAMAGE_COEFFICIENT
if(prob(1))
M.emote("shiver")
- if(istype(M, /mob/living/simple_animal/slime))
+ if(isslime(M))
M.bodytemperature -= rand(15,20)
..()
return
diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm
index b58eacfde4f..12b76321f27 100644
--- a/code/modules/research/xenobiology/xenobiology.dm
+++ b/code/modules/research/xenobiology/xenobiology.dm
@@ -219,7 +219,7 @@
icon_state = "bottle16"
/obj/item/weapon/slimesteroid/attack(mob/living/simple_animal/slime/M as mob, mob/user as mob)
- if(!istype(M, /mob/living/simple_animal/slime))//If target is not a slime.
+ if(!isslime(M))//If target is not a slime.
user << " The steroid only works on baby slimes!"
return ..()
if(M.is_adult) //Can't tame adults
diff --git a/html/changelogs/phil235-SlimeAnimal.yml b/html/changelogs/phil235-SlimeAnimal.yml
new file mode 100644
index 00000000000..416a7460cab
--- /dev/null
+++ b/html/changelogs/phil235-SlimeAnimal.yml
@@ -0,0 +1,7 @@
+author: phil235
+delete-after: True
+
+changes:
+ - tweak: "All slimes are now simple animals instead of carbon life forms."
+ - rscdel: "Remove crit status from brain and slimes."
+ - rscadd: "Simple animal aliens can now see in the dark like regular aliens."