This commit is contained in:
SandPoot
2023-11-29 22:40:13 -03:00
parent c9b0dedf77
commit 40f1d7401d
704 changed files with 1766 additions and 1743 deletions
@@ -289,7 +289,7 @@
/obj/machinery/module_duplicator/proc/print_module(list/design)
flick("module-fab-print", src)
addtimer(CALLBACK(src, .proc/finish_module_print, design), 1.6 SECONDS)
addtimer(CALLBACK(src, PROC_REF(finish_module_print), design), 1.6 SECONDS)
/obj/machinery/module_duplicator/proc/finish_module_print(list/design)
var/obj/item/circuit_component/module/module = new(drop_location())
@@ -333,7 +333,7 @@
data["materials"] = list(/datum/material/glass = total_cost)
flick("module-fab-scan", src)
addtimer(CALLBACK(src, .proc/finish_module_scan, user, data), 1.4 SECONDS)
addtimer(CALLBACK(src, PROC_REF(finish_module_scan), user, data), 1.4 SECONDS)
/obj/machinery/module_duplicator/proc/finish_module_scan(mob/user, data)
scanned_designs += list(data)
@@ -74,7 +74,7 @@ GLOBAL_LIST_EMPTY_TYPED(integrated_circuits, /obj/item/integrated_circuit)
GLOB.integrated_circuits += src
RegisterSignal(src, COMSIG_ATOM_USB_CABLE_TRY_ATTACH, .proc/on_atom_usb_cable_try_attach)
RegisterSignal(src, COMSIG_ATOM_USB_CABLE_TRY_ATTACH, PROC_REF(on_atom_usb_cable_try_attach))
/obj/item/integrated_circuit/loaded/Initialize(mapload)
. = ..()
@@ -148,7 +148,7 @@ GLOBAL_LIST_EMPTY_TYPED(integrated_circuits, /obj/item/integrated_circuit)
set_on(TRUE)
SEND_SIGNAL(src, COMSIG_CIRCUIT_SET_SHELL, new_shell)
shell = new_shell
RegisterSignal(shell, COMSIG_PARENT_QDELETING, .proc/remove_current_shell)
RegisterSignal(shell, COMSIG_PARENT_QDELETING, PROC_REF(remove_current_shell))
for(var/obj/item/circuit_component/attached_component as anything in attached_components)
attached_component.register_shell(shell)
// Their input ports may be updated with user values, but the outputs haven't updated
@@ -202,7 +202,7 @@ GLOBAL_LIST_EMPTY_TYPED(integrated_circuits, /obj/item/integrated_circuit)
to_add.rel_y = rand(COMPONENT_MIN_RANDOM_POS, COMPONENT_MAX_RANDOM_POS) - screen_y
to_add.parent = src
attached_components += to_add
RegisterSignal(to_add, COMSIG_MOVABLE_MOVED, .proc/component_move_handler)
RegisterSignal(to_add, COMSIG_MOVABLE_MOVED, PROC_REF(component_move_handler))
SStgui.update_uis(src)
if(shell)
@@ -545,7 +545,7 @@ GLOBAL_LIST_EMPTY_TYPED(integrated_circuits, /obj/item/integrated_circuit)
if(!add_component(component, usr))
qdel(component)
return
RegisterSignal(component, COMSIG_CIRCUIT_COMPONENT_REMOVED, .proc/clear_setter_or_getter)
RegisterSignal(component, COMSIG_CIRCUIT_COMPONENT_REMOVED, PROC_REF(clear_setter_or_getter))
setter_and_getter_count++
if("move_screen")
screen_x = text2num(params["screen_x"])
+1 -1
View File
@@ -34,7 +34,7 @@
say("Marked [target].")
marked_atom = target
RegisterSignal(marked_atom, COMSIG_PARENT_QDELETING, .proc/cleanup_marked_atom)
RegisterSignal(marked_atom, COMSIG_PARENT_QDELETING, PROC_REF(cleanup_marked_atom))
update_icon()
flick("multitool_circuit_flick", src)
playsound(src.loc, 'sound/misc/compiler-stage2.ogg', 30, TRUE)
+5 -5
View File
@@ -47,7 +47,7 @@
UnregisterSignal(value, COMSIG_PARENT_QDELETING)
src.value = datatype_handler.convert_value(src, value)
if(isatom(value))
RegisterSignal(value, COMSIG_PARENT_QDELETING, .proc/null_value)
RegisterSignal(value, COMSIG_PARENT_QDELETING, PROC_REF(null_value))
SEND_SIGNAL(src, COMSIG_PORT_SET_VALUE, value)
/**
@@ -167,9 +167,9 @@
*/
/datum/port/input/proc/connect(datum/port/output/output)
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)
RegisterSignal(output, COMSIG_PORT_SET_VALUE, PROC_REF(receive_value))
RegisterSignal(output, COMSIG_PORT_SET_TYPE, PROC_REF(check_type))
RegisterSignal(output, COMSIG_PORT_DISCONNECT, PROC_REF(disconnect))
// For signals, we don't update the input to prevent sending a signal when connecting ports.
if(!(datatype_handler.datatype_flags & DATATYPE_FLAG_AVOID_VALUE_UPDATE))
set_input(output.value)
@@ -199,7 +199,7 @@
*/
/datum/port/input/proc/receive_value(datum/port/output/output, value)
SIGNAL_HANDLER
SScircuit_component.add_callback(CALLBACK(src, .proc/set_input, value))
SScircuit_component.add_callback(CALLBACK(src, PROC_REF(set_input), value))
/// Signal handler proc to null the input if an atom is deleted. An update is not sent because this was not set by anything.
/datum/port/proc/null_value(datum/source)
+4 -4
View File
@@ -19,7 +19,7 @@
/obj/item/usb_cable/Initialize(mapload)
. = ..()
RegisterSignal(src, COMSIG_MOVABLE_MOVED, .proc/on_moved)
RegisterSignal(src, COMSIG_MOVABLE_MOVED, PROC_REF(on_moved))
/obj/item/usb_cable/examine(mob/user)
. = ..()
@@ -85,9 +85,9 @@
return OXYLOSS
/obj/item/usb_cable/proc/register_circuit_signals()
RegisterSignal(attached_circuit, COMSIG_MOVABLE_MOVED, .proc/on_moved)
RegisterSignal(attached_circuit, COMSIG_PARENT_QDELETING, .proc/on_circuit_qdeling)
RegisterSignal(attached_circuit.shell, COMSIG_MOVABLE_MOVED, .proc/on_moved)
RegisterSignal(attached_circuit, COMSIG_MOVABLE_MOVED, PROC_REF(on_moved))
RegisterSignal(attached_circuit, COMSIG_PARENT_QDELETING, PROC_REF(on_circuit_qdeling))
RegisterSignal(attached_circuit.shell, COMSIG_MOVABLE_MOVED, PROC_REF(on_moved))
/obj/item/usb_cable/proc/unregister_circuit_signals(obj/item/integrated_circuit/old_circuit)
UnregisterSignal(attached_circuit, list(