mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-20 19:42:34 +01:00
Merge pull request #4246 from MarinaGryphon/IE-Fixes
Integrated Electronics fixes.
This commit is contained in:
@@ -18,7 +18,9 @@
|
||||
else
|
||||
io_list.Add(new io_type(src, io_entry, default_data))
|
||||
|
||||
/obj/item/integrated_circuit/proc/set_pin_data(var/pin_type, var/pin_number, var/new_data)
|
||||
/obj/item/integrated_circuit/proc/set_pin_data(var/pin_type, var/pin_number, datum/new_data)
|
||||
if (istype(new_data) && !isweakref(new_data))
|
||||
new_data = weakref(new_data)
|
||||
var/datum/integrated_io/pin = get_pin_ref(pin_type, pin_number)
|
||||
return pin.write_data_to_pin(new_data)
|
||||
|
||||
|
||||
@@ -340,6 +340,7 @@
|
||||
// Set the pins so when someone sees them, they won't show as null
|
||||
set_pin_data(IC_INPUT, 1, frequency)
|
||||
set_pin_data(IC_INPUT, 2, code)
|
||||
push_data()
|
||||
|
||||
/obj/item/integrated_circuit/input/signaler/Destroy()
|
||||
if(radio_controller)
|
||||
@@ -468,6 +469,7 @@
|
||||
set_pin_data(IC_OUTPUT, 1, null)
|
||||
set_pin_data(IC_OUTPUT, 2, null)
|
||||
if(!T)
|
||||
push_data()
|
||||
return
|
||||
|
||||
set_pin_data(IC_OUTPUT, 1, T.x)
|
||||
@@ -490,7 +492,7 @@
|
||||
"speaker" = IC_PINTYPE_STRING,
|
||||
"message" = IC_PINTYPE_STRING
|
||||
)
|
||||
activators = list("on message received" = IC_PINTYPE_PULSE_IN, "on translation" = IC_PINTYPE_PULSE_OUT)
|
||||
activators = list("on message received" = IC_PINTYPE_PULSE_OUT, "on translation" = IC_PINTYPE_PULSE_OUT)
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
power_draw_per_use = 15
|
||||
|
||||
|
||||
Reference in New Issue
Block a user