mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 13:05:36 +01:00
[MIRROR] Added circuit component UI details, added multiplexer and allowed inserting components directly into shells. (#6479)
* Added circuit component UI details, added multiplexer and allowed inserting components directly into shells. (#59635) Adds the multiplexer circuit component - en.wikipedia.org/wiki/Multiplexer Circuit components can now be directly inserted into shells rather than having to take the integrated circuit out. Special information can be accessed from components now through the "Info" button besides the eject button on a component. * Added circuit component UI details, added multiplexer and allowed inserting components directly into shells. Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
This commit is contained in:
@@ -105,6 +105,10 @@
|
||||
source.balloon_alert(attacker, "[locked? "locked" : "unlocked"] [source]")
|
||||
return COMPONENT_NO_AFTERATTACK
|
||||
|
||||
if(attached_circuit && istype(item, /obj/item/circuit_component))
|
||||
attached_circuit.add_component(item, attacker)
|
||||
return
|
||||
|
||||
if(!istype(item, /obj/item/integrated_circuit))
|
||||
return
|
||||
var/obj/item/integrated_circuit/logic_board = item
|
||||
@@ -167,10 +171,15 @@
|
||||
SIGNAL_HANDLER
|
||||
remove_circuit()
|
||||
|
||||
/datum/component/shell/proc/on_circuit_add_component_manually(datum/source, obj/item/circuit_component/added_comp)
|
||||
/datum/component/shell/proc/on_circuit_add_component_manually(atom/source, obj/item/circuit_component/added_comp, mob/living/user)
|
||||
SIGNAL_HANDLER
|
||||
if(locked)
|
||||
source.balloon_alert(user, "it's locked!")
|
||||
return COMPONENT_CANCEL_ADD_COMPONENT
|
||||
|
||||
return COMPONENT_CANCEL_ADD_COMPONENT
|
||||
if(length(attached_circuit.attached_components) - length(unremovable_circuit_components) >= capacity)
|
||||
source.balloon_alert(user, "it's at maximum capacity!")
|
||||
return COMPONENT_CANCEL_ADD_COMPONENT
|
||||
|
||||
/**
|
||||
* Attaches a circuit to the parent. Doesn't do any checks to see for any existing circuits so that should be done beforehand.
|
||||
|
||||
Reference in New Issue
Block a user