mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-17 02:54:44 +01:00
Adds a lot of QoL to the integrated circuit UI. (#61677)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
This commit is contained in:
@@ -570,8 +570,17 @@ GLOBAL_LIST_EMPTY_TYPED(integrated_circuits, /obj/item/integrated_circuit)
|
||||
if(!add_component(component, usr))
|
||||
qdel(component)
|
||||
return
|
||||
if(params["is_setter"])
|
||||
var/obj/item/circuit_component/setter/setter = component
|
||||
setter.variable_name.set_input(params["variable"])
|
||||
else
|
||||
var/obj/item/circuit_component/getter/getter = component
|
||||
getter.variable_name.set_input(params["variable"])
|
||||
component.rel_x = text2num(params["rel_x"])
|
||||
component.rel_y = text2num(params["rel_y"])
|
||||
RegisterSignal(component, COMSIG_CIRCUIT_COMPONENT_REMOVED, .proc/clear_setter_or_getter)
|
||||
setter_and_getter_count++
|
||||
return TRUE
|
||||
if("move_screen")
|
||||
screen_x = text2num(params["screen_x"])
|
||||
screen_y = text2num(params["screen_y"])
|
||||
|
||||
@@ -168,10 +168,15 @@
|
||||
src.connected_ports = list()
|
||||
|
||||
/**
|
||||
* Introduces two ports to one another.
|
||||
* Connects an input port to an output port.
|
||||
*
|
||||
* Arguments:
|
||||
* * output - The output port to connect to.
|
||||
*/
|
||||
/datum/port/input/proc/connect(datum/port/output/output)
|
||||
connected_ports |= output
|
||||
if(output in connected_ports)
|
||||
return
|
||||
connected_ports += output
|
||||
RegisterSignal(output, COMSIG_PORT_SET_VALUE, .proc/receive_value)
|
||||
RegisterSignal(output, COMSIG_PORT_SET_TYPE, .proc/check_type)
|
||||
RegisterSignal(output, COMSIG_PORT_DISCONNECT, .proc/disconnect)
|
||||
|
||||
Reference in New Issue
Block a user