mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
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 🆑 Robwo add: Readds the triple ai station trait. /🆑
This commit is contained in:
@@ -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
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user