From f5706707e175339e49a84de11973ce611608f18d Mon Sep 17 00:00:00 2001 From: Kaostico Date: Tue, 17 Sep 2024 19:34:58 -0300 Subject: [PATCH] Add automatic whitelist refreshing subsystem --- code/__DEFINES/subsystems.dm | 1 + .../administration/code/whitelisting.dm | 11 ++++++++ modular_doppler/administration/readme.md | 27 +++++++++++++++++++ tgstation.dme | 1 + 4 files changed, 40 insertions(+) create mode 100644 modular_doppler/administration/code/whitelisting.dm create mode 100644 modular_doppler/administration/readme.md diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index c5e3172533a45..ffac380ae5caf 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -136,6 +136,7 @@ #define INIT_ORDER_DBCORE 95 #define INIT_ORDER_BLACKBOX 94 #define INIT_ORDER_SERVER_MAINT 93 +#define INIT_ORDER_WHITELIST 92 // DOPPLER EDIT ADDITION - automatic whitelist refresh #define INIT_ORDER_INPUT 85 #define INIT_ORDER_ADMIN_VERBS 84 // needs to be pretty high, admins can't do much without it #define INIT_ORDER_SOUNDS 83 diff --git a/modular_doppler/administration/code/whitelisting.dm b/modular_doppler/administration/code/whitelisting.dm new file mode 100644 index 0000000000000..f4a7c805c9e69 --- /dev/null +++ b/modular_doppler/administration/code/whitelisting.dm @@ -0,0 +1,11 @@ +SUBSYSTEM_DEF(whitelisting) + name = "Auto-Whitelist" + init_order = INIT_ORDER_WHITELIST + runlevels = RUNLEVEL_SETUP | RUNLEVEL_LOBBY | RUNLEVEL_GAME | RUNLEVEL_POSTGAME + wait = 5 MINUTES + +/datum/controller/subsystem/whitelisting/Initialize() + return SS_INIT_SUCCESS + +/datum/controller/subsystem/whitelisting/fire(resumed = FALSE) + load_whitelist() // yep that's it diff --git a/modular_doppler/administration/readme.md b/modular_doppler/administration/readme.md new file mode 100644 index 0000000000000..4e0edac8c60f8 --- /dev/null +++ b/modular_doppler/administration/readme.md @@ -0,0 +1,27 @@ +## Title: Administration + +MODULE ID: ADMINISTRATION + +### Description: + +This module contains everything related to administration, as well as serving as a place to add more to it. + +### TG Proc Changes: + +N/A + +### Defines: + +- `code\__DEFINES\subsystems.dm` subsystem's define + +### Master file additions + +N/A + +### Included files that are not contained in this module: + +N/A + +### Credits: + +Ephemeralis diff --git a/tgstation.dme b/tgstation.dme index 883d00980663d..fa9fe3bb4a56a 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -6429,6 +6429,7 @@ #include "modular_doppler\accessable_storage\accessable_storage.dm" #include "modular_doppler\accessable_storage\item.dm" #include "modular_doppler\accessable_storage\strippable.dm" +#include "modular_doppler\administration\code\whitelisting.dm" #include "modular_doppler\advanced_reskin\code\advanced_reskin.dm" #include "modular_doppler\cell_component\code\cell_component.dm" #include "modular_doppler\colony_fabricator\code\colony_fabricator.dm"