Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update storyteller_predictable.dm #7

Merged
merged 2 commits into from
Mar 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@
var/last_crew_score = 0
var/last_antag_score = 0

var/antag_event_delay = 5 MINUTES
var/mundane_event_delay = 10 MINUTES
var/moderate_event_delay = 30 MINUTES
var/major_event_delay = 90 MINUTES

COOLDOWN_DECLARE(antag_event_cooldown)
COOLDOWN_DECLARE(mundane_event_cooldown)
COOLDOWN_DECLARE(moderate_event_cooldown)
COOLDOWN_DECLARE(major_event_cooldown)
Expand Down Expand Up @@ -129,13 +131,13 @@

/datum/storyteller/predictable/handle_tracks()

. = FALSE
if(!COOLDOWN_FINISHED(src,antag_event_cooldown)) //Don't want to run an antag event then suddenly have meteors.
return FALSE

if(SSshuttle.emergency.mode == SHUTTLE_IDLE) //Only do serious shit if the emergency shuttle is at Central Command and not in transit.

if(storyteller_get_antag_to_crew_ratio() < (1/crew_per_antag) && find_and_buy_event_from_track(EVENT_TRACK_ROLESET))
. = TRUE

COOLDOWN_START(src,antag_event_cooldown,antag_event_delay)
return TRUE
if(COOLDOWN_FINISHED(src,major_event_cooldown) && find_and_buy_event_from_track(EVENT_TRACK_MAJOR))
COOLDOWN_START(src, major_event_cooldown, major_event_delay)
COOLDOWN_START(src, moderate_event_cooldown, moderate_event_delay)
Expand All @@ -150,3 +152,5 @@
if(COOLDOWN_FINISHED(src,mundane_event_cooldown) && find_and_buy_event_from_track(EVENT_TRACK_MUNDANE))
COOLDOWN_START(src, mundane_event_cooldown, mundane_event_delay)
return TRUE

return FALSE
Loading