mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 13:38:41 +01:00
[MIRROR] Refactors how components are triggered and refactors how ports are ordered (#7951)
* Refactors how components are triggered and refactors how ports are ordered (#60934) Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com> * Refactors how components are triggered and refactors how ports are ordered Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
This commit is contained in:
co-authored by
Watermelon914
Watermelon914
parent
94bc4b3a6a
commit
af8c0d2977
@@ -15,15 +15,10 @@
|
||||
|
||||
circuit_flags = CIRCUIT_FLAG_INPUT_SIGNAL|CIRCUIT_FLAG_OUTPUT_SIGNAL
|
||||
|
||||
/obj/item/circuit_component/tonumber/Initialize()
|
||||
. = ..()
|
||||
/obj/item/circuit_component/tonumber/populate_ports()
|
||||
input_port = add_input_port("Input", PORT_TYPE_STRING)
|
||||
|
||||
output = add_output_port("Output", PORT_TYPE_NUMBER)
|
||||
|
||||
/obj/item/circuit_component/tonumber/input_received(datum/port/input/port)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
output.set_output(text2num(input_port.value))
|
||||
|
||||
Reference in New Issue
Block a user