diff --git a/monkestation/code/modules/storytellers/converted_events/_base_event.dm b/monkestation/code/modules/storytellers/converted_events/_base_event.dm index 595c9d7ad75d..64ae9ee98f68 100644 --- a/monkestation/code/modules/storytellers/converted_events/_base_event.dm +++ b/monkestation/code/modules/storytellers/converted_events/_base_event.dm @@ -136,6 +136,9 @@ var/antag_datum /// Prompt players for consent to turn them into antags before doing so. Dont allow this for roundstart. var/prompted_picking = FALSE + /// A list of extra events to force whenever this one is chosen by the storyteller. + /// Can either be normal list or a weighted list. + var/list/extra_spawned_events /datum/round_event_control/antagonist/solo/from_ghosts/get_candidates() var/round_started = SSticker.HasRoundStarted() @@ -199,6 +202,15 @@ var/list/setup_minds = list() /// Whether we prompt the players before picking them. var/prompted_picking = FALSE //TODO: Implement this + /// DO NOT SET THIS MANUALLY, THIS IS INHERITED FROM THE EVENT CONTROLLER ON NEW + var/list/extra_spawned_events + +/datum/round_event/antagonist/solo/New(my_processing, datum/round_event_control/event_controller) + . = ..() + if(istype(event_controller, /datum/round_event_control/antagonist/solo)) + var/datum/round_event_control/antagonist/solo/antag_event_controller = event_controller + if(antag_event_controller?.extra_spawned_events) + extra_spawned_events = fill_with_ones(antag_event_controller.extra_spawned_events) /datum/round_event/antagonist/solo/setup() var/datum/round_event_control/antagonist/solo/cast_control = control @@ -267,6 +279,18 @@ candidate.mind.restricted_roles = restricted_roles setup = TRUE + if(LAZYLEN(extra_spawned_events)) + var/event_type = pick_weight(extra_spawned_events) + if(!event_type) + return + var/datum/round_event_control/triggered_event = locate(event_type) in SSgamemode.control + addtimer(CALLBACK(triggered_event, TYPE_PROC_REF(/datum/round_event_control, run_event), FALSE, null, FALSE, "storyteller"), 1 SECONDS) // wait a second to avoid any potential omnitraitor bs + +/datum/round_event/antagonist/solo/proc/spawn_extra_events() + if(!LAZYLEN(extra_spawned_events)) + return + var/datum/round_event_control/event = pick_weight(extra_spawned_events) + event?.run_event(random = FALSE, event_cause = "storyteller") /datum/round_event/antagonist/solo/ghost/setup() diff --git a/monkestation/code/modules/storytellers/converted_events/solo/brother.dm b/monkestation/code/modules/storytellers/converted_events/solo/brother.dm index c29c3ee7eac3..a2413bc3e608 100644 --- a/monkestation/code/modules/storytellers/converted_events/solo/brother.dm +++ b/monkestation/code/modules/storytellers/converted_events/solo/brother.dm @@ -30,8 +30,7 @@ JOB_SECURITY_ASSISTANT, ) required_enemies = 1 - // BBs should be less common/abundant than normal traitors, albeit not overly so. - weight = 16 + weight = 12 maximum_antags = 2 denominator = 30 cost = 0.45 // so it doesn't eat up threat for a relatively low-threat antag @@ -40,6 +39,11 @@ name = "Blood Brothers" roundstart = TRUE earliest_start = 0 SECONDS + extra_spawned_events = list( + /datum/round_event_control/antagonist/solo/traitor/roundstart = 12, + /datum/round_event_control/antagonist/solo/bloodsucker/roundstart = 4, + /datum/round_event_control/antagonist/solo/heretic/roundstart = 2, + ) /datum/round_event_control/antagonist/solo/brother/midround name = "Sleeper Agents (Blood Brothers)"