diff --git a/code/modules/modular_computers/file_system/program.dm b/code/modules/modular_computers/file_system/program.dm index e42da4daaec..93d9aa3bdbc 100644 --- a/code/modules/modular_computers/file_system/program.dm +++ b/code/modules/modular_computers/file_system/program.dm @@ -147,16 +147,27 @@ to_chat(user, span_danger("\The [computer] flashes an \"Access Denied\" warning.")) return FALSE -// This attempts to retrieve header data for UIs. If implementing completely new device of different type than existing ones -// always include the device here in this proc. This proc basically relays the request to whatever is running the program. +/** + * This attempts to retrieve header data for UIs. + * + * If implementing completely new device of different type than existing ones + * always include the device here in this proc. This proc basically relays the request to whatever is running the program. + **/ /datum/computer_file/program/proc/get_header_data() if(computer) return computer.get_header_data() return list() -// This is performed on program startup. May be overridden to add extra logic. Remember to include ..() call. Return 1 on success, 0 on failure. -// When implementing new program based device, use this to run the program. +/** + * Called on program startup. + * + * May be overridden to add extra logic. Remember to include ..() call. Return 1 on success, 0 on failure. + * When implementing new program based device, use this to run the program. + * Arguments: + * * user - The mob that started the program + **/ /datum/computer_file/program/proc/on_start(mob/living/user) + SHOULD_CALL_PARENT(TRUE) if(can_run(user, 1)) if(requires_ntnet) var/obj/item/card/id/ID @@ -182,8 +193,15 @@ /datum/computer_file/program/proc/run_emag() return FALSE -// Use this proc to kill the program. Designed to be implemented by each program if it requires on-quit logic, such as the NTNRC client. +/** + * Kills the running program + * + * Use this proc to kill the program. Designed to be implemented by each program if it requires on-quit logic, such as the NTNRC client. + * Arguments: + * * forced - Boolean to determine if this was a forced close. Should be TRUE if the user did not willingly close the program. + **/ /datum/computer_file/program/proc/kill_program(forced = FALSE) + SHOULD_CALL_PARENT(TRUE) program_state = PROGRAM_STATE_KILLED if(requires_ntnet) var/obj/item/card/id/ID diff --git a/code/modules/modular_computers/file_system/programs/signalcommander.dm b/code/modules/modular_computers/file_system/programs/signalcommander.dm index 3620ac06bcc..512e8040545 100644 --- a/code/modules/modular_computers/file_system/programs/signalcommander.dm +++ b/code/modules/modular_computers/file_system/programs/signalcommander.dm @@ -15,9 +15,13 @@ /// Radio connection datum used by signalers. var/datum/radio_frequency/radio_connection -/datum/computer_file/program/signal_commander/New() +/datum/computer_file/program/signal_commander/on_start(mob/living/user) + . = ..() set_frequency(signal_frequency) - return ..() + +/datum/computer_file/program/signal_commander/kill_program(forced) + . = ..() + SSradio.remove_object(computer, signal_frequency) /datum/computer_file/program/signal_commander/ui_data(mob/user) var/list/data = get_header_data()