mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-17 19:14:15 +01:00
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):  ## 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:
@@ -1,7 +1,7 @@
|
||||
/obj/item/circuit_component/equipment_action
|
||||
display_name = "Equipment Action"
|
||||
desc = "Represents an action the user can take when using supported shells."
|
||||
required_shells = list(/obj/item/organ/internal/cyberimp/bci, /obj/item/mod/module/circuit)
|
||||
required_shells = list(/obj/item/organ/cyberimp/bci, /obj/item/mod/module/circuit)
|
||||
|
||||
/// The icon of the button
|
||||
var/datum/port/input/option/icon_options
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
desc = "Digitizes user's sight for surveillance-on-the-go. User must have fully functional eyes for digitizer to work. Camera range input is either 0 (near) or 1 (far). Network field is used for camera network."
|
||||
category = "BCI"
|
||||
camera_prefix = "BCI"
|
||||
required_shells = list(/obj/item/organ/internal/cyberimp/bci)
|
||||
required_shells = list(/obj/item/organ/cyberimp/bci)
|
||||
|
||||
/// BCIs are organs, and thus the signal must be assigned ONLY when the shell has been installed in a mob - otherwise the camera will never update position
|
||||
camera_signal_move_override = TRUE
|
||||
@@ -314,13 +314,13 @@
|
||||
|
||||
/obj/item/circuit_component/remotecam/bci/register_shell(atom/movable/shell)
|
||||
. = ..()
|
||||
if(!istype(shell_parent, /obj/item/organ/internal/cyberimp/bci))
|
||||
if(!istype(shell_parent, /obj/item/organ/cyberimp/bci))
|
||||
return
|
||||
shell_camera = new /obj/machinery/camera (shell_parent)
|
||||
init_camera()
|
||||
RegisterSignal(shell_parent, COMSIG_ORGAN_IMPLANTED, PROC_REF(on_organ_implanted))
|
||||
RegisterSignal(shell_parent, COMSIG_ORGAN_REMOVED, PROC_REF(on_organ_removed))
|
||||
var/obj/item/organ/internal/cyberimp/bci/bci = shell_parent
|
||||
var/obj/item/organ/cyberimp/bci/bci = shell_parent
|
||||
if(bci.owner) //If somehow the camera was added while shell is already installed inside a mob, assign signals
|
||||
if(bciuser) //This should never happen... But if it does, unassign move signal from old mob
|
||||
UnregisterSignal(bciuser, COMSIG_MOVABLE_MOVED, PROC_REF(update_camera_location))
|
||||
@@ -388,7 +388,7 @@
|
||||
if (current_camera_emp)
|
||||
close_camera()
|
||||
return
|
||||
var/obj/item/organ/internal/cyberimp/bci/bci = shell_parent
|
||||
var/obj/item/organ/cyberimp/bci/bci = shell_parent
|
||||
//If shell is not currently inside a head, or user is currently blind, or user is dead
|
||||
if(!bci.owner || bci.owner.is_blind() || bci.owner.stat >= UNCONSCIOUS)
|
||||
close_camera()
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
desc = "A component that shows an three digit counter. Requires a BCI shell."
|
||||
category = "BCI"
|
||||
|
||||
required_shells = list(/obj/item/organ/internal/cyberimp/bci)
|
||||
required_shells = list(/obj/item/organ/cyberimp/bci)
|
||||
|
||||
var/datum/port/input/counter_number
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
var/datum/port/input/signal_update
|
||||
|
||||
var/obj/item/organ/internal/cyberimp/bci/bci
|
||||
var/obj/item/organ/cyberimp/bci/bci
|
||||
var/list/numbers = list()
|
||||
var/datum/weakref/counter_appearance
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
image_pixel_y = add_input_port("Y-Axis Shift", PORT_TYPE_NUMBER)
|
||||
|
||||
/obj/item/circuit_component/counter_overlay/register_shell(atom/movable/shell)
|
||||
if(istype(shell, /obj/item/organ/internal/cyberimp/bci))
|
||||
if(istype(shell, /obj/item/organ/cyberimp/bci))
|
||||
bci = shell
|
||||
RegisterSignal(shell, COMSIG_ORGAN_REMOVED, PROC_REF(on_organ_removed))
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
desc = "Requires a BCI shell. A component that shows an overlay on top of an object."
|
||||
category = "BCI"
|
||||
|
||||
required_shells = list(/obj/item/organ/internal/cyberimp/bci)
|
||||
required_shells = list(/obj/item/organ/cyberimp/bci)
|
||||
|
||||
var/datum/port/input/option/object_overlay_options
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
var/datum/port/input/signal_off
|
||||
|
||||
/// Reference to the BCI we're implanted inside
|
||||
var/obj/item/organ/internal/cyberimp/bci/bci
|
||||
var/obj/item/organ/cyberimp/bci/bci
|
||||
|
||||
/// Assoc list of REF to the target atom to the overlay alt appearance it is using
|
||||
var/list/active_overlays = list()
|
||||
@@ -66,7 +66,7 @@
|
||||
options_map = component_options
|
||||
|
||||
/obj/item/circuit_component/object_overlay/register_shell(atom/movable/shell)
|
||||
if(istype(shell, /obj/item/organ/internal/cyberimp/bci))
|
||||
if(istype(shell, /obj/item/organ/cyberimp/bci))
|
||||
bci = shell
|
||||
RegisterSignal(shell, COMSIG_ORGAN_REMOVED, PROC_REF(on_organ_removed))
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
desc = "Requires a BCI shell. When activated, this component will allow user to target an object using their brain and will output the reference to said object."
|
||||
category = "BCI"
|
||||
|
||||
required_shells = list(/obj/item/organ/internal/cyberimp/bci)
|
||||
required_shells = list(/obj/item/organ/cyberimp/bci)
|
||||
|
||||
var/datum/port/output/clicked_atom
|
||||
|
||||
var/obj/item/organ/internal/cyberimp/bci/bci
|
||||
var/obj/item/organ/cyberimp/bci/bci
|
||||
var/intercept_cooldown = 1 SECONDS
|
||||
|
||||
/obj/item/circuit_component/target_intercept/populate_ports()
|
||||
@@ -23,7 +23,7 @@
|
||||
clicked_atom = add_output_port("Targeted Object", PORT_TYPE_ATOM)
|
||||
|
||||
/obj/item/circuit_component/target_intercept/register_shell(atom/movable/shell)
|
||||
if(istype(shell, /obj/item/organ/internal/cyberimp/bci))
|
||||
if(istype(shell, /obj/item/organ/cyberimp/bci))
|
||||
bci = shell
|
||||
RegisterSignal(shell, COMSIG_ORGAN_REMOVED, PROC_REF(on_organ_removed))
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
desc = "A component that detects when a BCI is installed or removed from its user."
|
||||
category = "BCI"
|
||||
|
||||
required_shells = list(/obj/item/organ/internal/cyberimp/bci)
|
||||
required_shells = list(/obj/item/organ/cyberimp/bci)
|
||||
|
||||
var/datum/port/output/implanted
|
||||
var/datum/port/output/removed
|
||||
var/datum/port/output/current_state
|
||||
|
||||
var/obj/item/organ/internal/cyberimp/bci/bci
|
||||
var/obj/item/organ/cyberimp/bci/bci
|
||||
|
||||
/obj/item/circuit_component/install_detector/populate_ports()
|
||||
. = ..()
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/obj/item/circuit_component/install_detector/register_shell(atom/movable/shell)
|
||||
. = ..()
|
||||
if(istype(shell, /obj/item/organ/internal/cyberimp/bci))
|
||||
if(istype(shell, /obj/item/organ/cyberimp/bci))
|
||||
bci = shell
|
||||
RegisterSignal(shell, COMSIG_ORGAN_IMPLANTED, PROC_REF(on_organ_implanted))
|
||||
RegisterSignal(shell, COMSIG_ORGAN_REMOVED, PROC_REF(on_organ_removed))
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
category = "BCI"
|
||||
circuit_flags = CIRCUIT_NO_DUPLICATES
|
||||
|
||||
required_shells = list(/obj/item/organ/internal/cyberimp/bci)
|
||||
required_shells = list(/obj/item/organ/cyberimp/bci)
|
||||
|
||||
var/datum/port/input/inject
|
||||
var/datum/port/output/injected
|
||||
|
||||
var/obj/item/organ/internal/cyberimp/bci/bci
|
||||
var/obj/item/organ/cyberimp/bci/bci
|
||||
|
||||
/obj/item/circuit_component/reagent_injector/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
/obj/item/circuit_component/reagent_injector/register_shell(atom/movable/shell)
|
||||
. = ..()
|
||||
if(istype(shell, /obj/item/organ/internal/cyberimp/bci))
|
||||
if(istype(shell, /obj/item/organ/cyberimp/bci))
|
||||
bci = shell
|
||||
bci.create_reagents(15, OPENCONTAINER)
|
||||
if(reagents.total_volume)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
desc = "A component that allows the user to input a string using their mind. Requires a BCI shell."
|
||||
category = "BCI"
|
||||
|
||||
required_shells = list(/obj/item/organ/internal/cyberimp/bci)
|
||||
required_shells = list(/obj/item/organ/cyberimp/bci)
|
||||
|
||||
var/datum/port/input/input_name
|
||||
var/datum/port/input/input_desc
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
circuit_flags = CIRCUIT_FLAG_INPUT_SIGNAL
|
||||
|
||||
var/obj/item/organ/internal/cyberimp/bci/bci
|
||||
var/obj/item/organ/cyberimp/bci/bci
|
||||
var/ready = TRUE
|
||||
|
||||
/obj/item/circuit_component/thought_listener/populate_ports()
|
||||
@@ -31,7 +31,7 @@
|
||||
failure = add_output_port("On Failure", PORT_TYPE_SIGNAL)
|
||||
|
||||
/obj/item/circuit_component/thought_listener/register_shell(atom/movable/shell)
|
||||
if(istype(shell, /obj/item/organ/internal/cyberimp/bci))
|
||||
if(istype(shell, /obj/item/organ/cyberimp/bci))
|
||||
bci = shell
|
||||
|
||||
/obj/item/circuit_component/thought_listener/unregister_shell(atom/movable/shell)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
desc = "A component that plays a local VOX Announcement for the user. Requires a BCI shell."
|
||||
category = "BCI"
|
||||
|
||||
required_shells = list(/obj/item/organ/internal/cyberimp/bci)
|
||||
required_shells = list(/obj/item/organ/cyberimp/bci)
|
||||
|
||||
var/datum/port/input/option/type_option
|
||||
var/current_type
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
circuit_flags = CIRCUIT_FLAG_INPUT_SIGNAL
|
||||
|
||||
var/obj/item/organ/internal/cyberimp/bci/bci
|
||||
var/obj/item/organ/cyberimp/bci/bci
|
||||
|
||||
/obj/item/circuit_component/vox/populate_options()
|
||||
type_option = add_option_port("VOX Type", list(PORT_TYPE_LIST(PORT_TYPE_STRING), PORT_TYPE_STRING))
|
||||
@@ -28,7 +28,7 @@
|
||||
word_list = add_input_port("Word List", PORT_TYPE_LIST(PORT_TYPE_STRING))
|
||||
|
||||
/obj/item/circuit_component/vox/register_shell(atom/movable/shell)
|
||||
if(istype(shell, /obj/item/organ/internal/cyberimp/bci))
|
||||
if(istype(shell, /obj/item/organ/cyberimp/bci))
|
||||
bci = shell
|
||||
|
||||
/obj/item/circuit_component/vox/unregister_shell(atom/movable/shell)
|
||||
|
||||
Reference in New Issue
Block a user