From 4615aa0b3eab11cd06e840705fb4901b3bbf404e Mon Sep 17 00:00:00 2001 From: Robwo <31576505+R0bro@users.noreply.github.com> Date: Tue, 18 Aug 2026 14:36:14 -0400 Subject: [PATCH] Readds Triple AI Station Trait (#6004) ## About The Pull Request [Originally this feature was reverted on tg as the commit it was apart of outright deleted the secret's panel button to enable triple ai. ](https://github.com/tgstation/tgstation/commit/45ca1717d08aa591ebf3c201a56f569b00a9c71a#diff-b1ea40f4f23c37ede32062176eabbf77eca87b8478ea58764b1d2c6bc7bfc9d7) (side note: even before the removal, the trait was set to 0 weight by skyrat, so it'd never roll) This readds the feature while trying to not conflict with the admin panel button. Modular of course. ## Why It's Good For The Game Ai needs more toys and love. It is so rare you'll see a second ai on Bubber let alone a third as sop and lack of enthusiastic/trusting command makes it a nightmare to build one without being an antag. ## Proof Of Testing If the station trait rolls, the admin panel option reacts accordingly. Does not crash as far as I've tested! ## Changelog :cl: Robwo add: Readds the triple ai station trait. /:cl: --- .../datums/station_traits/neutral_traits.dm | 30 +++++++++++++++++++ tgstation.dme | 1 + 2 files changed, 31 insertions(+) create mode 100644 modular_zubbers/code/datums/station_traits/neutral_traits.dm diff --git a/modular_zubbers/code/datums/station_traits/neutral_traits.dm b/modular_zubbers/code/datums/station_traits/neutral_traits.dm new file mode 100644 index 00000000000..b708ef1fa09 --- /dev/null +++ b/modular_zubbers/code/datums/station_traits/neutral_traits.dm @@ -0,0 +1,30 @@ +/datum/station_trait/triple_ai + name = "AI Triumvirate" + trait_type = STATION_TRAIT_NEUTRAL + show_in_report = TRUE + weight = 1 + report_message = "Your station has been instated with three Nanotrasen Artificial Intelligence models." + +/datum/station_trait/triple_ai/New() + . = ..() + RegisterSignal(SSjob, COMSIG_OCCUPATIONS_DIVIDED, PROC_REF(on_occupations_divided)) + if(!GLOB.triple_ai_controller) + GLOB.triple_ai_controller = new() + +/datum/station_trait/triple_ai/revert() + UnregisterSignal(SSjob, COMSIG_OCCUPATIONS_DIVIDED) + if(GLOB.triple_ai_controller) + QDEL_NULL(GLOB.triple_ai_controller) + return ..() + +/datum/station_trait/triple_ai/proc/on_occupations_divided(datum/source, pure, allow_all) + SIGNAL_HANDLER + if(!GLOB.triple_ai_controller) + return + + for(var/datum/job/ai/ai_datum in SSjob.joinable_occupations) + ai_datum.spawn_positions = 3 + ai_datum.total_positions = 3 + if(!pure) + for(var/obj/effect/landmark/start/ai/secondary/secondary_ai_spawn in GLOB.start_landmarks_list) + secondary_ai_spawn.latejoin_active = TRUE diff --git a/tgstation.dme b/tgstation.dme index 006c9065de7..bf50a935c17 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -9271,6 +9271,7 @@ #include "modular_zubbers\code\datums\station_traits\disabled_traits.dm" #include "modular_zubbers\code\datums\station_traits\job_traits.dm" #include "modular_zubbers\code\datums\station_traits\negative_traits.dm" +#include "modular_zubbers\code\datums\station_traits\neutral_traits.dm" #include "modular_zubbers\code\datums\storage\subtypes\belts.dm" #include "modular_zubbers\code\datums\storage\subtypes\others\misc.dm" #include "modular_zubbers\code\datums\votes\_vote_datum.dm"