Allows clings to regenerate without a brain. (#19856)

* Move brain organ code where it belongs

* Rename too

* WIP, but hey, it kinda works now.

* Account for a few missing heads

* Remove vital check, killing the user on death

* Let defibs and scanners better deal with these

* Remove debug brains

* Clean up some more contingencies

* More head checks

* Update code/modules/antagonists/changeling/datum_changeling.dm

Co-authored-by: Farie82 <farie82@users.noreply.github.com>

* Fixes up signal business

* some stuff from sean's review

* Add some type safety checks for heads

* oops

* Update code/game/objects/items/weapons/cosmetics.dm

get this in there too

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>

* Remove decap sword

* Quick suggestions

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>

* Addresses shedding problems

* Add new defib changes

* this is why we have CI

Co-authored-by: Farie82 <farie82@users.noreply.github.com>
Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
Luc
2023-01-20 19:25:51 -05:00
committed by GitHub
co-authored by Farie82 S34N Ryan
parent b90bb7bcb8
commit b940c1eb21
27 changed files with 208 additions and 133 deletions
+3 -2
View File
@@ -597,7 +597,8 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes)
if(!eyes) // should still get stabbed in the head
var/obj/item/organ/external/head/head = H.bodyparts_by_name["head"]
head.receive_damage(rand(10,14), 1)
if(head)
head.receive_damage(rand(10, 14), 1)
return
eyes.receive_damage(rand(3,4), 1)
if(eyes.damage >= eyes.min_bruised_damage)
@@ -615,7 +616,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
if(M.stat != 2)
to_chat(M, "<span class='danger'>You go blind!</span>")
var/obj/item/organ/external/affecting = H.get_organ("head")
if(affecting.receive_damage(7))
if(istype(affecting) && affecting.receive_damage(7))
H.UpdateDamageIcon()
else
M.take_organ_damage(7)
@@ -111,6 +111,9 @@
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/head/C = H.get_organ("head")
if(!istype(C))
to_chat(user, "<span class='warning'>There's nothing to cut, [M] [M.p_are()] missing [M.p_their()] head!</span>")
return ..()
var/datum/robolimb/robohead = GLOB.all_robolimbs[C.model]
if(user.zone_selected == "mouth")
if(!get_location_accessible(H, "mouth"))
@@ -28,6 +28,9 @@
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/head/C = H.get_organ("head")
if(!C)
to_chat(user, "<span class='warning'>[M] doesn't have a head!</span>")
return
//facial hair
var/f_new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in H.generate_valid_facial_hairstyles()
//handle normal hair
@@ -122,7 +122,7 @@
if(!QDELETED(H) && air_contents && air_contents.return_pressure() >= 1000)
var/obj/item/organ/external/head/head = H.get_organ("head")
head.disfigure()
head?.disfigure()
H.inflate_gib()
return OBLITERATION
+1 -1
View File
@@ -108,7 +108,7 @@
var/obj/item/organ/external/head/head = H.get_organ("head")
if(QDELETED(head))
if(QDELETED(head) || !istype(head))
blade_status = GUILLOTINE_BLADE_DROPPED
icon_state = "guillotine"
return