From e7b2aee9cb5722775b496cdb38fd9547a03cd130 Mon Sep 17 00:00:00 2001 From: Lucy Date: Sun, 7 Jan 2024 03:30:59 -0500 Subject: [PATCH 1/2] All crew can now view the manifest on their PDA --- .../computers/item/disks/role_disks.dm | 2 +- .../modular_computers/computers/item/pda.dm | 1 + .../file_system/programs/crewmanifest.dm | 15 +++++++++++++++ tgstation.dme | 1 + 4 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 monkestation/code/modules/modular_computers/file_system/programs/crewmanifest.dm diff --git a/code/modules/modular_computers/computers/item/disks/role_disks.dm b/code/modules/modular_computers/computers/item/disks/role_disks.dm index e8c68bc83637..87d0689648bd 100644 --- a/code/modules/modular_computers/computers/item/disks/role_disks.dm +++ b/code/modules/modular_computers/computers/item/disks/role_disks.dm @@ -6,7 +6,7 @@ max_capacity = 32 ///Static list of programss ALL command tablets have. var/static/list/datum/computer_file/command_programs = list( - /datum/computer_file/program/crew_manifest, + // /datum/computer_file/program/crew_manifest, monke edit: everyone has the crew manifest anyways now /datum/computer_file/program/science, /datum/computer_file/program/status, ) diff --git a/code/modules/modular_computers/computers/item/pda.dm b/code/modules/modular_computers/computers/item/pda.dm index 6b877c359421..57330af37c11 100644 --- a/code/modules/modular_computers/computers/item/pda.dm +++ b/code/modules/modular_computers/computers/item/pda.dm @@ -36,6 +36,7 @@ /datum/computer_file/program/messenger, /datum/computer_file/program/nt_pay, /datum/computer_file/program/notepad, + /datum/computer_file/program/crew_manifest // monke edit: install crew manifest by default ) ///List of items that can be stored in a PDA var/static/list/contained_item = list( diff --git a/monkestation/code/modules/modular_computers/file_system/programs/crewmanifest.dm b/monkestation/code/modules/modular_computers/file_system/programs/crewmanifest.dm new file mode 100644 index 000000000000..2e62e63f4112 --- /dev/null +++ b/monkestation/code/modules/modular_computers/file_system/programs/crewmanifest.dm @@ -0,0 +1,15 @@ +/datum/computer_file/program/crew_manifest + transfer_access = list() + detomatix_resistance = NONE + +/datum/computer_file/program/crew_manifest/New() + . = ..() + RegisterSignal(SSdcs, COMSIG_GLOB_CREWMEMBER_JOINED, PROC_REF(_update_ui_data)) + +/datum/computer_file/program/crew_manifest/Destroy() + . = ..() + UnregisterSignal(SSdcs, COMSIG_GLOB_CREWMEMBER_JOINED) + +/datum/computer_file/program/crew_manifest/proc/_update_ui_data() + SIGNAL_HANDLER + update_static_data_for_all_viewers() diff --git a/tgstation.dme b/tgstation.dme index dde22f21322b..6d3b719823b0 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -6312,6 +6312,7 @@ #include "monkestation\code\modules\modular_bartending\item_modifications\attack_additions.dm" #include "monkestation\code\modules\modular_bartending\item_modifications\reagent_modification.dm" #include "monkestation\code\modules\modular_bartending\reactions\food_reactions.dm" +#include "monkestation\code\modules\modular_computers\file_system\programs\crewmanifest.dm" #include "monkestation\code\modules\ocean_content\department_consoles\engineering.dm" #include "monkestation\code\modules\ocean_content\fluff\barrier.dm" #include "monkestation\code\modules\ocean_content\fluff\base_turf_editor.dm" From 307ebe29a0df2ec59fe7cf4c753797227c34504b Mon Sep 17 00:00:00 2001 From: Lucy Date: Mon, 8 Jan 2024 18:19:21 -0500 Subject: [PATCH 2/2] Address review: move `..()` call to bottom --- .../modular_computers/file_system/programs/crewmanifest.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkestation/code/modules/modular_computers/file_system/programs/crewmanifest.dm b/monkestation/code/modules/modular_computers/file_system/programs/crewmanifest.dm index 2e62e63f4112..0bc47f5530b6 100644 --- a/monkestation/code/modules/modular_computers/file_system/programs/crewmanifest.dm +++ b/monkestation/code/modules/modular_computers/file_system/programs/crewmanifest.dm @@ -7,8 +7,8 @@ RegisterSignal(SSdcs, COMSIG_GLOB_CREWMEMBER_JOINED, PROC_REF(_update_ui_data)) /datum/computer_file/program/crew_manifest/Destroy() - . = ..() UnregisterSignal(SSdcs, COMSIG_GLOB_CREWMEMBER_JOINED) + return ..() /datum/computer_file/program/crew_manifest/proc/_update_ui_data() SIGNAL_HANDLER