mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
[MIRROR] Add config entries for PR_ANNOUNCEMENTS_PER_ROUND and STATION_GOAL_BUDGET [MDB IGNORE] (#11145)
* Add config entries for PR_ANNOUNCEMENTS_PER_ROUND and STATION_GOAL_BUDGET (#64368) Co-authored-by: Kyle Spier-Swenson <kyleshome@ gmail.com> * Add config entries for PR_ANNOUNCEMENTS_PER_ROUND and STATION_GOAL_BUDGET Co-authored-by: Tim <timothymtorres@gmail.com> Co-authored-by: Kyle Spier-Swenson <kyleshome@ gmail.com>
This commit is contained in:
co-authored by
Kyle Spier-Swenson
Tim
parent
88bf0be89e
commit
105f0cc610
@@ -1,7 +1,3 @@
|
||||
// TODO these two should be config options
|
||||
#define PR_ANNOUNCEMENTS_PER_ROUND 5 //The number of unique PR announcements allowed per round
|
||||
#define STATION_GOAL_BUDGET 1
|
||||
|
||||
//config files
|
||||
#define CONFIG_GET(X) global.config.Get(/datum/config_entry/##X)
|
||||
#define CONFIG_SET(X, Y) global.config.Set(/datum/config_entry/##X, ##Y)
|
||||
|
||||
@@ -394,3 +394,8 @@
|
||||
/datum/config_entry/flag/sdql_spells
|
||||
|
||||
/datum/config_entry/flag/native_fov
|
||||
|
||||
/datum/config_entry/number/station_goal_budget
|
||||
default = 1
|
||||
min_val = 0
|
||||
integer = FALSE
|
||||
|
||||
@@ -618,3 +618,8 @@
|
||||
|
||||
/datum/config_entry/flag/station_name_in_hub_entry
|
||||
default = FALSE
|
||||
|
||||
/datum/config_entry/number/pr_announcements_per_round
|
||||
default = 5
|
||||
min_val = 0
|
||||
integer = TRUE
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
PRcounts[id] = 1
|
||||
else
|
||||
++PRcounts[id]
|
||||
if(PRcounts[id] > PR_ANNOUNCEMENTS_PER_ROUND)
|
||||
if(PRcounts[id] > CONFIG_GET(number/pr_announcements_per_round))
|
||||
return
|
||||
|
||||
var/final_composed = span_announce("PR: [input[keyword]]")
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
/datum/game_mode/proc/generate_station_goals()
|
||||
var/list/possible = subtypesof(/datum/station_goal)
|
||||
var/goal_weights = 0
|
||||
while(possible.len && goal_weights < STATION_GOAL_BUDGET)
|
||||
while(possible.len && goal_weights < CONFIG_GET(number/station_goal_budget))
|
||||
var/datum/station_goal/picked = pick_n_take(possible)
|
||||
goal_weights += initial(picked.weight)
|
||||
GLOB.station_goals += new picked
|
||||
|
||||
+1
-1
@@ -218,7 +218,7 @@ GLOBAL_VAR(restart_counter)
|
||||
PRcounts[id] = 1
|
||||
else
|
||||
++PRcounts[id]
|
||||
if(PRcounts[id] > PR_ANNOUNCEMENTS_PER_ROUND)
|
||||
if(PRcounts[id] > CONFIG_GET(number/pr_announcements_per_round))
|
||||
return
|
||||
|
||||
var/final_composed = span_announce("PR: [announcement]")
|
||||
|
||||
Reference in New Issue
Block a user