Make simplemobs drop bones if leave remains are on (#18784)

* allows ckeyless simplemobs to have remains

* mice dont leave bones

* we do not need that init overhead

* tfw my comments look like ai slop
This commit is contained in:
tacoguy7765093
2025-12-26 06:40:20 +01:00
committed by GitHub
parent fc203865a8
commit f705a21e45
3 changed files with 19 additions and 2 deletions
@@ -93,7 +93,7 @@
/datum/species/monkey/handle_post_spawn(var/mob/living/carbon/human/H)
if(!H.ckey)
H.can_be_drop_prey = TRUE
H.digest_leave_remains = 1
H.digest_leave_remains = TRUE
H.low_priority = TRUE
return ..()
@@ -17,6 +17,8 @@
has_huds = TRUE // We do show AI status huds for buildmode players
digest_leave_remains = TRUE
var/tt_desc = null //Tooltip description
//Settings for played mobs
+16 -1
View File
@@ -42,7 +42,7 @@
skull_type = /obj/item/digestion_remains/skull/sergal
/obj/belly/proc/handle_remains_leaving(var/mob/living/M)
if(!ishuman(M) && !isrobot(M)) //Are we even humanoid or a borg?
if(!isliving(M)) //Are we even a living thing? (Sorry ghosts)
return
//Moving some vars here for both borgs and carbons to use
var/bones_amount = rand(2,4) //some random variety in amount of bones left
@@ -60,6 +60,21 @@
new new_bone(src,owner)
return //Dont need to do carbon stuff after this
if(ismouse(M)) //Mice dont have massive bones to leave behind
return
if(isanimal(M)) //If they are a simplemob
var/list/organic_bones = list( //Generic bone variation system
/obj/item/digestion_remains,
/obj/item/digestion_remains/variant1,
/obj/item/digestion_remains/variant2,
/obj/item/digestion_remains/variant3
)
for(var/i = 1, i <= bones_amount, i++)
var/new_bone = pick(organic_bones)
new new_bone(src,owner)
return
var/mob/living/carbon/human/H = M
if((H.species.name in GLOB.remainless_species)) //Don't leave anything if there is nothing to leave