The death or internal/external organ pathing (ft. fixed fox ears and recoloring bodypart overlays with dye sprays) (#87434)

## About The Pull Request
This PR kills the abstract internal and external typepaths for organs,
now replaced by an EXTERNAL_ORGAN flag to distinguish the two kinds.

This PR also fixes fox ears (from #87162, no tail is added) and
mushpeople's caps (they should be red, the screenshot is a tad
outdated).

And yes, you can now use a hair dye spray to recolor body parts like
most tails, podpeople hair, mushpeople caps and cat ears. The process
can be reversed by using the spray again.

## Why It's Good For The Game
Time-Green put some effort during the last few months to untie functions
and mechanics from external/internal organ pathing. Now, all that this
pathing is good for are a few typechecks, easily replaceable with
bitflags.

Also podpeople and mushpeople need a way to recolor their "hair". This
kind of applies to fish tails from the fish infusion, which colors can't
be selected right now. The rest is just there if you ever want to
recolor your lizard tail for some reason.

Proof of testing btw (screenshot taken before mushpeople cap fix, right
side has dyed body parts, moth can't be dyed, they're already fabolous):

![immagine](https://github.com/user-attachments/assets/2bb625c9-9233-42eb-b9b8-e0bd6909ce89)

## Changelog

🆑
code: Removed internal/external pathing from organs in favor of a bit
flag. Hopefully this shouldn't break anything about organs.
fix: Fixed invisible fox ears.
fix: Fixed mushpeople caps not being colored red by default.
add: You can now dye most tails, podpeople hair, mushpeople caps etc.
with a hair dye spray.
/🆑
This commit is contained in:
Ghom
2024-10-30 08:03:02 +01:00
committed by GitHub
parent 0ec91798a7
commit 778ed9f1ab
473 changed files with 2564 additions and 2445 deletions
@@ -1,4 +1,4 @@
/obj/item/organ/internal/cyberimp/bci
/obj/item/organ/cyberimp/bci
name = "brain-computer interface"
desc = "An implant that can be placed in a user's head to control circuits using their brain."
icon = 'icons/obj/science/circuits.dmi'
@@ -6,7 +6,7 @@
zone = BODY_ZONE_HEAD
w_class = WEIGHT_CLASS_TINY
/obj/item/organ/internal/cyberimp/bci/Initialize(mapload)
/obj/item/organ/cyberimp/bci/Initialize(mapload)
. = ..()
RegisterSignal(src, COMSIG_CIRCUIT_ACTION_COMPONENT_REGISTERED, PROC_REF(action_comp_registered))
@@ -19,7 +19,7 @@
new /obj/item/circuit_component/bci_core,
), SHELL_CAPACITY_SMALL, starting_circuit = circuit)
/obj/item/organ/internal/cyberimp/bci/say(
/obj/item/organ/cyberimp/bci/say(
message,
bubble_type,
list/spans = list(),
@@ -43,11 +43,11 @@
return ..()
/obj/item/organ/internal/cyberimp/bci/proc/action_comp_registered(datum/source, obj/item/circuit_component/equipment_action/action_comp)
/obj/item/organ/cyberimp/bci/proc/action_comp_registered(datum/source, obj/item/circuit_component/equipment_action/action_comp)
SIGNAL_HANDLER
LAZYADD(actions, new/datum/action/innate/bci_action(src, action_comp))
/obj/item/organ/internal/cyberimp/bci/proc/action_comp_unregistered(datum/source, obj/item/circuit_component/equipment_action/action_comp)
/obj/item/organ/cyberimp/bci/proc/action_comp_unregistered(datum/source, obj/item/circuit_component/equipment_action/action_comp)
SIGNAL_HANDLER
var/datum/action/innate/bci_action/action = action_comp.granted_to[REF(src)]
if(!istype(action))
@@ -61,10 +61,10 @@
check_flags = AB_CHECK_CONSCIOUS
button_icon_state = "bci_power"
var/obj/item/organ/internal/cyberimp/bci/bci
var/obj/item/organ/cyberimp/bci/bci
var/obj/item/circuit_component/equipment_action/circuit_component
/datum/action/innate/bci_action/New(obj/item/organ/internal/cyberimp/bci/_bci, obj/item/circuit_component/equipment_action/circuit_component)
/datum/action/innate/bci_action/New(obj/item/organ/cyberimp/bci/_bci, obj/item/circuit_component/equipment_action/circuit_component)
..()
bci = _bci
circuit_component.granted_to[REF(_bci)] = src
@@ -95,7 +95,7 @@
var/datum/weakref/user
var/obj/item/organ/internal/cyberimp/bci/bci
var/obj/item/organ/cyberimp/bci/bci
/obj/item/circuit_component/bci_core/populate_ports()
@@ -290,7 +290,7 @@
var/busy_icon_state
var/locked = FALSE
var/obj/item/organ/internal/cyberimp/bci/bci_to_implant
var/obj/item/organ/cyberimp/bci/bci_to_implant
COOLDOWN_DECLARE(message_cooldown)
@@ -365,13 +365,13 @@
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
/obj/machinery/bci_implanter/attackby(obj/item/weapon, mob/user, params)
var/obj/item/organ/internal/cyberimp/bci/new_bci = weapon
var/obj/item/organ/cyberimp/bci/new_bci = weapon
if (istype(new_bci))
if (!(locate(/obj/item/integrated_circuit) in new_bci))
balloon_alert(user, "bci has no circuit!")
return
var/obj/item/organ/internal/cyberimp/bci/previous_bci_to_implant = bci_to_implant
var/obj/item/organ/cyberimp/bci/previous_bci_to_implant = bci_to_implant
user.transferItemToLoc(weapon, src)
bci_to_implant = weapon
@@ -428,7 +428,7 @@
playsound(loc, 'sound/machines/ping.ogg', 30, FALSE)
var/obj/item/organ/internal/cyberimp/bci/bci_organ = carbon_occupant.get_organ_by_type(/obj/item/organ/internal/cyberimp/bci)
var/obj/item/organ/cyberimp/bci/bci_organ = carbon_occupant.get_organ_by_type(/obj/item/organ/cyberimp/bci)
if (bci_organ)
bci_organ.Remove(carbon_occupant)
@@ -460,7 +460,7 @@
var/mob/living/carbon/carbon_occupant = occupant
if (istype(occupant))
var/obj/item/organ/internal/cyberimp/bci/bci_organ = carbon_occupant.get_organ_by_type(/obj/item/organ/internal/cyberimp/bci)
var/obj/item/organ/cyberimp/bci/bci_organ = carbon_occupant.get_organ_by_type(/obj/item/organ/cyberimp/bci)
if (isnull(bci_organ) && isnull(bci_to_implant))
say("No brain-computer interface inserted, and occupant does not have one. Insert a BCI to implant one.")
playsound(src, 'sound/machines/buzz/buzz-sigh.ogg', 30, TRUE)