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,7 +10,7 @@
desc = "A component that shows an three digit counter. Requires a BCI shell."
category = "BCI"
required_shells = list(/obj/item/organ/cyberimp/bci)
required_shells = list(/obj/item/organ/internal/cyberimp/bci)
var/datum/port/input/counter_number
@@ -19,7 +19,7 @@
var/datum/port/input/signal_update
var/obj/item/organ/cyberimp/bci/bci
var/obj/item/organ/internal/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/cyberimp/bci))
if(istype(shell, /obj/item/organ/internal/cyberimp/bci))
bci = shell
RegisterSignal(shell, COMSIG_ORGAN_REMOVED, .proc/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/cyberimp/bci)
required_shells = list(/obj/item/organ/internal/cyberimp/bci)
var/datum/port/input/option/object_overlay_options
@@ -27,7 +27,7 @@
var/datum/port/input/signal_on
var/datum/port/input/signal_off
var/obj/item/organ/cyberimp/bci/bci
var/obj/item/organ/internal/cyberimp/bci/bci
var/list/active_overlays = list()
var/list/options_map
@@ -63,7 +63,7 @@
options_map = component_options
/obj/item/circuit_component/object_overlay/register_shell(atom/movable/shell)
if(istype(shell, /obj/item/organ/cyberimp/bci))
if(istype(shell, /obj/item/organ/internal/cyberimp/bci))
bci = shell
RegisterSignal(shell, COMSIG_ORGAN_REMOVED, .proc/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/cyberimp/bci)
required_shells = list(/obj/item/organ/internal/cyberimp/bci)
var/datum/port/output/clicked_atom
var/obj/item/organ/cyberimp/bci/bci
var/obj/item/organ/internal/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/cyberimp/bci))
if(istype(shell, /obj/item/organ/internal/cyberimp/bci))
bci = shell
RegisterSignal(shell, COMSIG_ORGAN_REMOVED, .proc/on_organ_removed)
@@ -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/cyberimp/bci)
required_shells = list(/obj/item/organ/internal/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/cyberimp/bci/bci
var/obj/item/organ/internal/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/cyberimp/bci))
if(istype(shell, /obj/item/organ/internal/cyberimp/bci))
bci = shell
/obj/item/circuit_component/thought_listener/unregister_shell(atom/movable/shell)
+3 -3
View File
@@ -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/cyberimp/bci)
required_shells = list(/obj/item/organ/internal/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/cyberimp/bci/bci
var/obj/item/organ/internal/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/cyberimp/bci))
if(istype(shell, /obj/item/organ/internal/cyberimp/bci))
bci = shell
/obj/item/circuit_component/vox/unregister_shell(atom/movable/shell)
@@ -1,4 +1,4 @@
/obj/item/organ/cyberimp/bci
/obj/item/organ/internal/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/wiremod.dmi'
@@ -7,7 +7,7 @@
zone = BODY_ZONE_HEAD
w_class = WEIGHT_CLASS_TINY
/obj/item/organ/cyberimp/bci/Initialize(mapload)
/obj/item/organ/internal/cyberimp/bci/Initialize(mapload)
. = ..()
var/obj/item/integrated_circuit/circuit = new(src)
@@ -17,13 +17,13 @@
new /obj/item/circuit_component/bci_core,
), SHELL_CAPACITY_SMALL, starting_circuit = circuit)
/obj/item/organ/cyberimp/bci/Insert(mob/living/carbon/reciever, special, drop_if_replaced)
/obj/item/organ/internal/cyberimp/bci/Insert(mob/living/carbon/reciever, special, drop_if_replaced)
. = ..()
// Organs are put in nullspace, but this breaks circuit interactions
forceMove(reciever)
/obj/item/organ/cyberimp/bci/say(message, bubble_type, list/spans, sanitize, datum/language/language, ignore_spam, forced)
/obj/item/organ/internal/cyberimp/bci/say(message, bubble_type, list/spans, sanitize, datum/language/language, ignore_spam, forced)
if (owner)
// Otherwise say_dead will be called.
// It's intentional that a circuit for a dead person does not speak from the shell.
@@ -37,7 +37,7 @@
/obj/item/circuit_component/equipment_action/bci
display_name = "BCI Action"
desc = "Represents an action the user can take when implanted with the brain-computer interface."
required_shells = list(/obj/item/organ/cyberimp/bci)
required_shells = list(/obj/item/organ/internal/cyberimp/bci)
/// A reference to the action button itself
var/datum/action/innate/bci_action/bci_action
@@ -48,7 +48,7 @@
/obj/item/circuit_component/equipment_action/bci/register_shell(atom/movable/shell)
. = ..()
var/obj/item/organ/cyberimp/bci/bci = shell
var/obj/item/organ/internal/cyberimp/bci/bci = shell
if(istype(bci))
bci_action = new(src)
update_action()
@@ -56,7 +56,7 @@
bci.actions += list(bci_action)
/obj/item/circuit_component/equipment_action/bci/unregister_shell(atom/movable/shell)
var/obj/item/organ/cyberimp/bci/bci = shell
var/obj/item/organ/internal/cyberimp/bci/bci = shell
if(istype(bci))
bci.actions -= bci_action
QDEL_NULL(bci_action)
@@ -118,7 +118,7 @@
return ..()
/obj/item/circuit_component/bci_core/register_shell(atom/movable/shell)
var/obj/item/organ/cyberimp/bci/bci = shell
var/obj/item/organ/internal/cyberimp/bci/bci = shell
charge_action = new(src)
bci.actions += list(charge_action)
@@ -127,7 +127,7 @@
RegisterSignal(shell, COMSIG_ORGAN_REMOVED, .proc/on_organ_removed)
/obj/item/circuit_component/bci_core/unregister_shell(atom/movable/shell)
var/obj/item/organ/cyberimp/bci/bci = shell
var/obj/item/organ/internal/cyberimp/bci/bci = shell
bci.actions -= charge_action
QDEL_NULL(charge_action)
@@ -290,7 +290,7 @@
occupant_typecache = typecacheof(/mob/living/carbon)
/obj/machinery/bci_implanter/on_deconstruction()
var/obj/item/organ/cyberimp/bci/bci_to_implant_resolved = bci_to_implant?.resolve()
var/obj/item/organ/internal/cyberimp/bci/bci_to_implant_resolved = bci_to_implant?.resolve()
bci_to_implant_resolved?.forceMove(drop_location())
bci_to_implant = null
@@ -350,7 +350,7 @@
balloon_alert(user, "it's locked!")
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
var/obj/item/organ/cyberimp/bci/bci_to_implant_resolved = bci_to_implant?.resolve()
var/obj/item/organ/internal/cyberimp/bci/bci_to_implant_resolved = bci_to_implant?.resolve()
if (isnull(bci_to_implant_resolved))
balloon_alert(user, "no bci inserted!")
else
@@ -362,13 +362,13 @@
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
/obj/machinery/bci_implanter/attackby(obj/item/weapon, mob/user, params)
var/obj/item/organ/cyberimp/bci/new_bci = weapon
var/obj/item/organ/internal/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/cyberimp/bci/previous_bci_to_implant = bci_to_implant?.resolve()
var/obj/item/organ/internal/cyberimp/bci/previous_bci_to_implant = bci_to_implant?.resolve()
bci_to_implant = WEAKREF(weapon)
weapon.moveToNullspace()
@@ -425,8 +425,8 @@
playsound(loc, 'sound/machines/ping.ogg', 30, FALSE)
var/obj/item/organ/cyberimp/bci/bci_organ = carbon_occupant.getorgan(/obj/item/organ/cyberimp/bci)
var/obj/item/organ/cyberimp/bci/bci_to_implant_resolved = bci_to_implant?.resolve()
var/obj/item/organ/internal/cyberimp/bci/bci_organ = carbon_occupant.getorgan(/obj/item/organ/internal/cyberimp/bci)
var/obj/item/organ/internal/cyberimp/bci/bci_to_implant_resolved = bci_to_implant?.resolve()
if (bci_organ)
bci_organ.Remove(carbon_occupant)
@@ -459,7 +459,7 @@
var/mob/living/carbon/carbon_occupant = occupant
if (istype(occupant))
var/obj/item/organ/cyberimp/bci/existing_bci_organ = carbon_occupant.getorgan(/obj/item/organ/cyberimp/bci)
var/obj/item/organ/internal/cyberimp/bci/existing_bci_organ = carbon_occupant.getorgan(/obj/item/organ/internal/cyberimp/bci)
if (isnull(existing_bci_organ) && isnull(bci_to_implant?.resolve()))
say("No brain-computer interface inserted, and occupant does not have one. Insert a BCI to implant one.")
playsound(src, 'sound/machines/buzz-sigh.ogg', 30, TRUE)
+1 -1
View File
@@ -61,7 +61,7 @@
/obj/item/shell/bci
name = "brain-computer interface assembly"
icon_state = "bci-open"
shell_to_spawn = /obj/item/organ/cyberimp/bci
shell_to_spawn = /obj/item/organ/internal/cyberimp/bci
/obj/item/shell/scanner_gate
name = "scanner gate assembly"