Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,6 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S

#define INCREMENT_TALLY(L, stat) if(L[stat]){L[stat]++}else{L[stat] = 1}

//TODO Move to a pref
#define STATION_GOAL_BUDGET 1

//Endgame Results
#define NUKE_NEAR_MISS 1
#define NUKE_MISS_STATION 2
Expand Down
18 changes: 15 additions & 3 deletions code/game/gamemodes/dynamic/dynamic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,23 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
return rule.round_result()
return ..()

/datum/game_mode/dynamic/generate_station_goals()
if(round(shown_threat) < 30)
if(length(current_players[CURRENT_LIVING_ANTAGS]))
station_goal_budget = 2
else if(round(shown_threat < 20))
station_goal_budget = INFINITY
return ..()
Comment on lines +260 to +266

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be able to be used as an antag check, which this is.


/datum/game_mode/dynamic/send_intercept()
. = "<b><i>Central Command Status Summary</i></b><hr>"
var/green_shift = FALSE
switch(round(shown_threat))
if(0 to 19)
if(!current_players[CURRENT_LIVING_ANTAGS].len)
. += "<b>Peaceful Waypoint</b></center><BR>"
. += "Your station orbits deep within controlled, core-sector systems and serves as a waypoint for routine traffic through Nanotrasen's trade empire. Due to the combination of high security, interstellar traffic, and low strategic value, it makes any direct threat of violence unlikely. Your primary enemies will be incompetence and bored crewmen: try to organize team-building events to keep staffers interested and productive."
Comment on lines 273 to 275

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this allow roundstart antag metaing?

green_shift = TRUE
else
. += "<b>Core Territory</b></center><BR>"
. += "Your station orbits within reliably mundane, secure space. Although Nanotrasen has a firm grip on security in your region, the valuable resources and strategic position aboard your station make it a potential target for infiltrations. Monitor crew for non-loyal behavior, but expect a relatively tame shift free of large-scale destruction. We expect great things from your station."
Expand Down Expand Up @@ -291,9 +301,11 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
. += G.get_report()

print_command_report(., "Central Command Status Summary", announce=FALSE)
priority_announce("A summary has been copied and printed to all communications consoles.", "Enemy communication intercepted. Security level elevated.", "intercept")
if(GLOB.security_level < SEC_LEVEL_BLUE)
set_security_level(SEC_LEVEL_BLUE)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new send_intercept no longer sets the security level at all. The roundstart security level doesn't get set at all with this PR. raise_security_level() and lower_security_level() are defined in this PR, but they aren't actually used anywhere.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a bug from a completely different PR, fixed in #15813

if(green_shift)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be probability based to allow fake greens / fake blues like our non-dynamic modes have.

priority_announce("Thanks to the tireless efforts of our security and intelligence divisions, there are currently no credible threats to [station_name()]. All station construction projects have been authorized. Have a secure shift!", "Security Report", "commandreport")
else
priority_announce("A summary has been copied and printed to all communications consoles.", "Enemy communication intercepted. Security level elevated.", "intercept")


/datum/game_mode/dynamic/proc/show_threatlog(mob/admin)
if(!SSticker.HasRoundStarted())
Expand Down
4 changes: 3 additions & 1 deletion code/game/gamemodes/game_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
var/setup_error //What stopepd setting up the mode.
var/flipseclevel = FALSE //CIT CHANGE - adds a 10% chance for the alert level to be the opposite of what the gamemode is supposed to have

var/station_goal_budget = 1 // how many station goals are allowed in this mode

/// Associative list of current players, in order: living players, living antagonists, dead players and observers.
var/list/list/current_players = list(CURRENT_LIVING_PLAYERS = list(), CURRENT_LIVING_ANTAGS = list(), CURRENT_DEAD_PLAYERS = list(), CURRENT_OBSERVERS = list())

Expand Down Expand Up @@ -593,7 +595,7 @@
continue
possible += T
var/goal_weights = 0
while(possible.len && goal_weights < STATION_GOAL_BUDGET)
while(possible.len && goal_weights < station_goal_budget)
var/datum/station_goal/picked = pick_n_take(possible)
goal_weights += initial(picked.weight)
station_goals += new picked
Expand Down
8 changes: 8 additions & 0 deletions code/modules/security_levels/security_levels.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ GLOBAL_LIST_INIT(all_security_levels, list("green", "blue", "amber", "red", "del

//config.alert_desc_blue_downto

/proc/raise_security_level(level)
if(GLOB.security_level < level)
set_security_level(level)

/proc/lower_security_level(level)
if(GLOB.security_level > level)
set_security_level(level)

/proc/set_security_level(level)
if(!isnum(level))
level = GLOB.all_security_levels.Find(level)
Expand Down