Skip to content

Commit

Permalink
[MIRROR] Fixes masspurbation erroring out when trying to give/remove …
Browse files Browse the repository at this point in the history
…cat tails from incompatible subspecies of humans (#2403) (#3266)

* Fixes masspurbation erroring out when trying to give/remove cat tails from incompatible subspecies of humans

* Update felinid.dm

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: Afevis <[email protected]>
Co-authored-by: Mal <[email protected]>
  • Loading branch information
4 people authored May 9, 2024
1 parent fd84626 commit dc8a962
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions code/modules/mob/living/carbon/human/species_types/felinid.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,6 @@
var/datum/species/human/felinid/cat_species = soon_to_be_felinid.dna.species
cat_species.original_felinid = FALSE
else
// GOLDEN TODO - Make this check that they don't already have tails and ears before inserting them.
var/obj/item/organ/internal/ears/cat/kitty_ears = new
var/obj/item/organ/external/tail/cat/kitty_tail = new

// This removes the spines if they exist
var/obj/item/organ/external/spines/current_spines = soon_to_be_felinid.get_organ_slot(ORGAN_SLOT_EXTERNAL_SPINES)
if(current_spines)
Expand All @@ -150,8 +146,12 @@
// Humans get converted directly to felinids, and the key is handled in on_species_gain.
// Now when we get mob.dna.features[feature_key], it returns None, which is why the tail is invisible.
// stored_feature_id is only set once (the first time an organ is inserted), so this should be safe.
var/obj/item/organ/internal/ears/cat/kitty_ears = new
kitty_ears.Insert(soon_to_be_felinid, special = TRUE, movement_flags = DELETE_IF_REPLACED)
kitty_tail.Insert(soon_to_be_felinid, special = TRUE, movement_flags = DELETE_IF_REPLACED)
if(should_external_organ_apply_to(/obj/item/organ/external/tail/cat, soon_to_be_felinid)) //only give them a tail if they actually have sprites for it / are a compatible subspecies.
var/obj/item/organ/external/tail/cat/kitty_tail = new
kitty_tail.Insert(soon_to_be_felinid, special = TRUE, movement_flags = DELETE_IF_REPLACED)

if(!silent)
to_chat(soon_to_be_felinid, span_boldnotice("Something is nya~t right."))
playsound(get_turf(soon_to_be_felinid), 'sound/effects/meow1.ogg', 50, TRUE, -1)
Expand All @@ -172,6 +172,8 @@
qdel(old_tail)
// Locate does not work on assoc lists, so we do it by hand
for(var/external_organ in target_species.external_organs)
if(!should_external_organ_apply_to(external_organ, purrbated_human))
continue
if(ispath(external_organ, /obj/item/organ/external/tail))
var/obj/item/organ/external/tail/new_tail = new external_organ()
new_tail.Insert(purrbated_human, special = TRUE, movement_flags = DELETE_IF_REPLACED)
Expand Down

0 comments on commit dc8a962

Please sign in to comment.