This tail refactor turned into an organ refactor. Funny how that works. (#67017)

* Fuck you (refactors ur tails)

* Errors

* Wow. Pain.

* Fixes up probably everything

* finish up here

* Fixes hard del maybe

* original owner hard del

* garbage collection runtime

* suck my peen byond

* Mapped tails

* motherfucker.

* motherrfucker. again.

* Whooopppppsie

* yeah bad idea

* Turns out external organs literally just sat in nullspace forever if their parent was deleted, and didnt Remove() themselves, causing harddels.

* So anyways I repathed all organs

* Fixes

* really.

* unit test... test

* unit test-test but it passes linters this time because im a moh-ron

* I've lost track of what im doing at this point

* Hopefully fixes hard del?

* meh

* Update code/datums/dna.dm

* things n stuff

* repath from master pull
This commit is contained in:
Kapu1178
2022-05-30 21:18:34 -07:00
committed by GitHub
parent f837a3e541
commit 6d470992cb
317 changed files with 2090 additions and 2118 deletions
+10 -10
View File
@@ -143,9 +143,9 @@
/datum/crafting_recipe/tailclub
name = "Tail Club"
result = /obj/item/tailclub
reqs = list(/obj/item/organ/tail/lizard = 1,
reqs = list(/obj/item/organ/external/tail/lizard = 1,
/obj/item/stack/sheet/iron = 1)
blacklist = list(/obj/item/organ/tail/lizard/fake)
blacklist = list(/obj/item/organ/external/tail/lizard/fake)
time = 40
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
@@ -153,9 +153,9 @@
/datum/crafting_recipe/tailwhip
name = "Liz O' Nine Tails"
result = /obj/item/melee/chainofcommand/tailwhip
reqs = list(/obj/item/organ/tail/lizard = 1,
reqs = list(/obj/item/organ/external/tail/lizard = 1,
/obj/item/stack/cable_coil = 1)
blacklist = list(/obj/item/organ/tail/lizard/fake)
blacklist = list(/obj/item/organ/external/tail/lizard/fake)
time = 40
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
@@ -163,7 +163,7 @@
/datum/crafting_recipe/catwhip
name = "Cat O' Nine Tails"
result = /obj/item/melee/chainofcommand/tailwhip/kitty
reqs = list(/obj/item/organ/tail/cat = 1,
reqs = list(/obj/item/organ/external/tail/cat = 1,
/obj/item/stack/cable_coil = 1)
time = 40
category = CAT_WEAPONRY
@@ -635,7 +635,7 @@
name = "Lizard Cloche Hat"
result = /obj/item/clothing/head/lizard
time = 10
reqs = list(/obj/item/organ/tail/lizard = 1)
reqs = list(/obj/item/organ/external/tail/lizard = 1)
category = CAT_CLOTHING
/datum/crafting_recipe/lizardhat_alternate
@@ -649,8 +649,8 @@
name = "Kitty Ears"
result = /obj/item/clothing/head/kitty/genuine
time = 10
reqs = list(/obj/item/organ/tail/cat = 1,
/obj/item/organ/ears/cat = 1)
reqs = list(/obj/item/organ/external/tail/cat = 1,
/obj/item/organ/internal/ears/cat = 1)
category = CAT_CLOTHING
@@ -760,7 +760,7 @@
/datum/crafting_recipe/flashlight_eyes
name = "Flashlight Eyes"
result = /obj/item/organ/eyes/robotic/flashlight
result = /obj/item/organ/internal/eyes/robotic/flashlight
time = 10
reqs = list(
/obj/item/flashlight = 2,
@@ -1288,7 +1288,7 @@
reqs = list(/obj/item/stack/cable_coil = 5,
/obj/item/stack/rods = 2,
/obj/item/stack/sheet/glass = 1,
/obj/item/organ/heart/ethereal = 1,
/obj/item/organ/internal/heart/ethereal = 1,
)
category = CAT_MISC
+1 -1
View File
@@ -160,7 +160,7 @@
// For carbonss we also want to clear out the stomach of any holywater
if(iscarbon(target))
var/mob/living/carbon/carbon_target = target
var/obj/item/organ/stomach/belly = carbon_target.getorganslot(ORGAN_SLOT_STOMACH)
var/obj/item/organ/internal/stomach/belly = carbon_target.getorganslot(ORGAN_SLOT_STOMACH)
if(belly)
holy_to_unholy += belly.reagents.get_reagent_amount(/datum/reagent/water/holywater)
belly.reagents.del_reagent(/datum/reagent/water/holywater)
+5 -5
View File
@@ -1,7 +1,7 @@
/datum/component/manual_blinking
dupe_mode = COMPONENT_DUPE_UNIQUE
var/obj/item/organ/eyes/E
var/obj/item/organ/internal/eyes/E
var/warn_grace = FALSE
var/warn_dying = FALSE
var/last_blink
@@ -69,18 +69,18 @@
/datum/component/manual_blinking/proc/check_added_organ(mob/who_cares, obj/item/organ/O)
SIGNAL_HANDLER
var/obj/item/organ/eyes/new_eyes = O
var/obj/item/organ/internal/eyes/new_eyes = O
if(istype(new_eyes,/obj/item/organ/eyes))
if(istype(new_eyes,/obj/item/organ/internal/eyes))
E = new_eyes
START_PROCESSING(SSdcs, src)
/datum/component/manual_blinking/proc/check_removed_organ(mob/who_cares, obj/item/organ/O)
SIGNAL_HANDLER
var/obj/item/organ/eyes/bye_beyes = O // oh come on, that's pretty good
var/obj/item/organ/internal/eyes/bye_beyes = O // oh come on, that's pretty good
if(istype(bye_beyes, /obj/item/organ/eyes))
if(istype(bye_beyes, /obj/item/organ/internal/eyes))
E = null
STOP_PROCESSING(SSdcs, src)
+5 -5
View File
@@ -1,7 +1,7 @@
/datum/component/manual_breathing
dupe_mode = COMPONENT_DUPE_UNIQUE
var/obj/item/organ/lungs/L
var/obj/item/organ/internal/lungs/L
var/warn_grace = FALSE
var/warn_dying = FALSE
var/last_breath
@@ -71,18 +71,18 @@
/datum/component/manual_breathing/proc/check_added_organ(mob/who_cares, obj/item/organ/O)
SIGNAL_HANDLER
var/obj/item/organ/eyes/new_lungs = O
var/obj/item/organ/internal/eyes/new_lungs = O
if(istype(new_lungs,/obj/item/organ/lungs))
if(istype(new_lungs,/obj/item/organ/internal/lungs))
L = new_lungs
START_PROCESSING(SSdcs, src)
/datum/component/manual_breathing/proc/check_removed_organ(mob/who_cares, obj/item/organ/O)
SIGNAL_HANDLER
var/obj/item/organ/lungs/old_lungs = O
var/obj/item/organ/internal/lungs/old_lungs = O
if(istype(old_lungs, /obj/item/organ/lungs))
if(istype(old_lungs, /obj/item/organ/internal/lungs))
L = null
STOP_PROCESSING(SSdcs, src)
+2 -2
View File
@@ -169,7 +169,7 @@
var/mob/living/carbon/human/lich = new(parent_turf)
ADD_TRAIT(lich, TRAIT_NO_SOUL, LICH_TRAIT)
var/obj/item/organ/brain/new_lich_brain = lich.getorganslot(ORGAN_SLOT_BRAIN)
var/obj/item/organ/internal/brain/new_lich_brain = lich.getorganslot(ORGAN_SLOT_BRAIN)
if(new_lich_brain) // Prevent MMI cheese
new_lich_brain.organ_flags &= ~ORGAN_VITAL
new_lich_brain.decoy_override = TRUE
@@ -201,7 +201,7 @@
var/mob/living/carbon/carbon_body = corpse
for(var/obj/item/organ/to_drop as anything in carbon_body.internal_organs)
// Skip the brain - it can disappear, we don't need it anymore
if(istype(to_drop, /obj/item/organ/brain))
if(istype(to_drop, /obj/item/organ/internal/brain))
continue
// For the rest, drop all the organs onto the floor (for style)
+1 -1
View File
@@ -46,7 +46,7 @@
else if(isstructure(parent))
RegisterSignal(parent, COMSIG_ATOM_ATTACK_HAND, .proc/use_squeak)
if(istype(parent, /obj/item/organ/liver))
if(istype(parent, /obj/item/organ/internal/liver))
// Liver squeaking is depending on them functioning like a clown's liver
RegisterSignal(parent, SIGNAL_REMOVETRAIT(TRAIT_COMEDY_METABOLISM), .proc/on_comedy_metabolism_removal)
@@ -110,7 +110,7 @@
)
return
var/obj/item/organ/tongue/licking_tongue = user.getorganslot(ORGAN_SLOT_TONGUE)
var/obj/item/organ/internal/tongue/licking_tongue = user.getorganslot(ORGAN_SLOT_TONGUE)
if(licking_tongue)
dust_mob(source, user,
span_danger("As [user] hesitantly leans in and licks [atom_source] everything goes silent before [user.p_their()] body starts to glow and burst into flames before flashing to ash!"),
+3 -2
View File
@@ -288,9 +288,10 @@
defense_mod += 2
if(islizard(T))
if(!T.getorganslot(ORGAN_SLOT_TAIL)) // lizards without tails are off-balance
var/obj/item/organ/external/tail/el_tail = T.getorganslot(ORGAN_SLOT_EXTERNAL_TAIL)
if(!el_tail) // lizards without tails are off-balance
defense_mod -= 1
else if(T.dna.species.is_wagging_tail()) // lizard tail wagging is robust and can swat away assailants!
else if(el_tail.wag_flags & WAG_WAGGING) // lizard tail wagging is robust and can swat away assailants!
defense_mod += 1
// OF-FENSE