Skip to content

Commit

Permalink
Fixes BCI overlay components (#9757)
Browse files Browse the repository at this point in the history
* Fixes BCI overlays

* Fixes overlays not vanishing

* fixes BCI overlays

* Relative coords

* Revert "Relative coords"

This reverts commit 149da28.

* no more free actions
  • Loading branch information
Dejaku51 authored Oct 31, 2023
1 parent 185ccc5 commit 5d8bfca
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion code/game/alternate_appearance.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ GLOBAL_LIST_EMPTY(active_alternate_appearances)
if(alternate_appearances && alternate_appearances[key])
return
var/list/arguments = args.Copy(2)
new type(arglist(arguments))
return new type(arglist(arguments))

/datum/atom_hud/alternate_appearance
var/appearance_key
Expand Down
1 change: 1 addition & 0 deletions code/modules/wiremod/components/bci/hud/bar_overlay.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
var/overlay_limit = 10

/obj/item/circuit_component/object_overlay/bar/populate_ports()
..()
bar_number = add_input_port("Number", PORT_TYPE_NUMBER)

/obj/item/circuit_component/object_overlay/bar/populate_options()
Expand Down
4 changes: 2 additions & 2 deletions code/modules/wiremod/components/bci/hud/counter_overlay.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
/obj/item/circuit_component/counter_overlay/register_shell(atom/movable/shell)
if(istype(shell, /obj/item/organ/cyberimp/bci))
bci = shell
RegisterSignal(shell, COMSIG_CARBON_LOSE_ORGAN, PROC_REF(on_organ_removed))
RegisterSignal(shell, COMSIG_ORGAN_REMOVED, PROC_REF(on_organ_removed))

/obj/item/circuit_component/counter_overlay/unregister_shell(atom/movable/shell)
bci = null
QDEL_NULL(counter_appearance)
for(var/number in numbers)
QDEL_NULL(number)
UnregisterSignal(shell, COMSIG_CARBON_LOSE_ORGAN)
UnregisterSignal(shell, COMSIG_ORGAN_REMOVED)

/obj/item/circuit_component/counter_overlay/input_received(datum/port/input/port)
if(!bci)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/wiremod/components/bci/hud/object_overlay.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@
/obj/item/circuit_component/object_overlay/register_shell(atom/movable/shell)
if(istype(shell, /obj/item/organ/cyberimp/bci))
bci = shell
RegisterSignal(shell, COMSIG_CARBON_LOSE_ORGAN, PROC_REF(on_organ_removed))
RegisterSignal(shell, COMSIG_ORGAN_REMOVED, PROC_REF(on_organ_removed))

/obj/item/circuit_component/object_overlay/unregister_shell(atom/movable/shell)
bci = null
UnregisterSignal(shell, COMSIG_CARBON_LOSE_ORGAN)
UnregisterSignal(shell, COMSIG_ORGAN_REMOVED)

/obj/item/circuit_component/object_overlay/input_received(datum/port/input/port)
if(!bci)
Expand Down
3 changes: 0 additions & 3 deletions code/modules/wiremod/shell/brain_computer_interface.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@

AddComponent(/datum/component/shell, list(
new /obj/item/circuit_component/bci_core,
new /obj/item/circuit_component/bci_action(null, "One"),
new /obj/item/circuit_component/bci_action(null, "Two"),
new /obj/item/circuit_component/bci_action(null, "Three"),
), SHELL_CAPACITY_SMALL)

/obj/item/organ/cyberimp/bci/Insert(mob/living/carbon/reciever, special, drop_if_replaced)
Expand Down

0 comments on commit 5d8bfca

Please sign in to comment.