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
@@ -105,6 +105,10 @@ GLOBAL_LIST_INIT(preference_entries_by_key, init_preference_entries_by_key())
/// will show the feature as selectable.
var/relevant_species_trait = null
/// If the selected species has this in its /datum/species/var/external_organs,
/// will show the feature as selectable.
var/relevant_external_organ = null
/// Called on the saved input when retrieving.
/// Also called by the value sent from the user through UI. Do not trust it.
/// Input is the value inside the savefile, output is to tell other code
@@ -318,7 +322,7 @@ GLOBAL_LIST_INIT(preference_entries_by_key, init_preference_entries_by_key())
SHOULD_CALL_PARENT(TRUE)
SHOULD_NOT_SLEEP(TRUE)
if (!isnull(relevant_mutant_bodypart) || !isnull(relevant_species_trait))
if (!isnull(relevant_mutant_bodypart) || !isnull(relevant_species_trait) || !isnull(relevant_external_organ))
var/species_type = preferences.read_preference(/datum/preference/choiced/species)
var/datum/species/species = new species_type
@@ -34,7 +34,7 @@
if(!hetero)
target.eye_color_right = value
var/obj/item/organ/eyes/eyes_organ = target.getorgan(/obj/item/organ/eyes)
var/obj/item/organ/internal/eyes/eyes_organ = target.getorgan(/obj/item/organ/internal/eyes)
if (!eyes_organ || !istype(eyes_organ))
return
@@ -3,13 +3,13 @@
savefile_identifier = PREFERENCE_CHARACTER
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
can_randomize = FALSE
relevant_mutant_bodypart = "tail_human"
relevant_external_organ = /obj/item/organ/external/tail/cat
/datum/preference/choiced/tail_human/init_possible_values()
return assoc_to_keys(GLOB.tails_list_human)
/datum/preference/choiced/tail_human/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["tail_human"] = value
target.dna.features["tail_cat"] = value
/datum/preference/choiced/tail_human/create_default_value()
var/datum/sprite_accessory/tails/human/cat/tail = /datum/sprite_accessory/tails/human/cat
@@ -131,10 +131,14 @@
savefile_key = "feature_lizard_tail"
savefile_identifier = PREFERENCE_CHARACTER
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
relevant_mutant_bodypart = "tail_lizard"
relevant_external_organ = /obj/item/organ/external/tail/lizard
/datum/preference/choiced/lizard_tail/init_possible_values()
return assoc_to_keys(GLOB.tails_list_lizard)
/datum/preference/choiced/lizard_tail/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["tail_lizard"] = value
/datum/preference/choiced/lizard_tail/create_default_value()
var/datum/sprite_accessory/tails/lizard/smooth/tail = /datum/sprite_accessory/tails/lizard/smooth
return initial(tail.name)
+2 -2
View File
@@ -7,7 +7,7 @@
/mob/living/carbon/set_suicide(suicide_state) //you thought that box trick was pretty clever, didn't you? well now hardmode is on, boyo.
. = ..()
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
var/obj/item/organ/internal/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
if(B)
B.suicided = suicide_state
@@ -85,7 +85,7 @@
var/suicide_message
if(!combat_mode)
var/obj/item/organ/brain/userbrain = getorgan(/obj/item/organ/brain)
var/obj/item/organ/internal/brain/userbrain = getorgan(/obj/item/organ/internal/brain)
if(userbrain?.damage >= 75)
suicide_message = "[src] pulls both arms outwards in front of [p_their()] chest and pumps them behind [p_their()] back, repeats this motion in a smaller range of motion \
down to [p_their()] hips two times once more all while sliding [p_their()] legs in a faux walking motion, claps [p_their()] hands together \