mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-26 22:56:33 +01:00
@@ -109,7 +109,7 @@ var/global/const/AI_FREQ = 1343
|
||||
var/global/const/DTH_FREQ = 1341
|
||||
var/global/const/SYND_FREQ = 1213
|
||||
var/global/const/RAID_FREQ = 1277
|
||||
var/global/const/ENT_FREQ = 1461 //entertainment frequency. This is not a diona exclusive frequency.
|
||||
var/global/const/ENT_FREQ = 1461 //entertainment frequency. This is not a Diona exclusive frequency.
|
||||
|
||||
// department channels
|
||||
var/global/const/PUB_FREQ = 1459
|
||||
@@ -194,11 +194,11 @@ var/global/list/DEPT_FREQS = list(AI_FREQ, COMM_FREQ, ENG_FREQ, ENT_FREQ, MED_FR
|
||||
//Other devices can then choose to send signals to only those devices that belong to a particular filter.
|
||||
//This is done for performance, so we don't send signals to lots of machines unnecessarily.
|
||||
|
||||
//This filter is special because devices belonging to default also recieve signals sent to any other filter.
|
||||
//This filter is special because devices belonging to default also receive signals sent to any other filter.
|
||||
var/global/const/RADIO_DEFAULT = "radio_default"
|
||||
|
||||
var/global/const/RADIO_TO_AIRALARM = "radio_airalarm" //air alarms
|
||||
var/global/const/RADIO_FROM_AIRALARM = "radio_airalarm_rcvr" //devices interested in recieving signals from air alarms
|
||||
var/global/const/RADIO_FROM_AIRALARM = "radio_airalarm_rcvr" //devices interested in receiving signals from air alarms
|
||||
var/global/const/RADIO_CHAT = "radio_telecoms"
|
||||
var/global/const/RADIO_ATMOSIA = "radio_atmos"
|
||||
var/global/const/RADIO_NAVBEACONS = "radio_navbeacon"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// This is a simple ticker for the new event system.
|
||||
// The logic that determines what events get chosen is held inside a seperate subsystem.
|
||||
// The logic that determines what events get chosen is held inside a separate subsystem.
|
||||
|
||||
SUBSYSTEM_DEF(event_ticker)
|
||||
name = "Events (Ticker)"
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
// individual player (IC) skill, and such, in order to try to choose the best events to take in order to add spice or variety to
|
||||
// the round.
|
||||
|
||||
// This subsystem holds the logic that chooses events. Actual event processing is handled in a seperate subsystem.
|
||||
// This subsystem holds the logic that chooses events. Actual event processing is handled in a separate subsystem.
|
||||
SUBSYSTEM_DEF(game_master)
|
||||
name = "Events (Game Master)"
|
||||
wait = 60 SECONDS
|
||||
runlevels = RUNLEVEL_GAME
|
||||
|
||||
// The GM object is what actually chooses events.
|
||||
// It's held in a seperate object for better encapsulation, and allows for different 'flavors' of GMs to be made, that choose events differently.
|
||||
// It's held in a separate object for better encapsulation, and allows for different 'flavors' of GMs to be made, that choose events differently.
|
||||
var/datum/game_master/GM = null
|
||||
var/game_master_type = /datum/game_master/default
|
||||
|
||||
var/list/available_events = list() // A list of meta event objects.
|
||||
|
||||
var/danger = 0 // The GM's best guess at how chaotic the round is. High danger makes it hold back.
|
||||
var/staleness = -20 // Determines liklihood of the GM doing something, increases over time.
|
||||
var/staleness = -20 // Determines likelihood of the GM doing something, increases over time.
|
||||
|
||||
var/next_event = 0 // Minimum amount of time of nothingness until the GM can pick something again.
|
||||
|
||||
@@ -93,11 +93,11 @@ SUBSYSTEM_DEF(game_master)
|
||||
staleness = round( between(-20, staleness + amount, 100), 0.1)
|
||||
|
||||
// These are ran before committing to an event.
|
||||
// Returns TRUE if the system is allowed to procede, otherwise returns FALSE.
|
||||
// Returns TRUE if the system is allowed to proceed, otherwise returns FALSE.
|
||||
/datum/controller/subsystem/game_master/proc/pre_event_checks(quiet = FALSE)
|
||||
if(!ticker || ticker.current_state != GAME_STATE_PLAYING)
|
||||
if(!quiet)
|
||||
log_game_master("Unable to start event: Ticker is nonexistant, or the game is not ongoing.")
|
||||
log_game_master("Unable to start event: Ticker is nonexistent, or the game is not ongoing.")
|
||||
return FALSE
|
||||
if(GM.ignore_time_restrictions)
|
||||
return TRUE
|
||||
@@ -135,10 +135,10 @@ SUBSYSTEM_DEF(game_master)
|
||||
|
||||
// This object makes the actual decisions.
|
||||
/datum/game_master
|
||||
// Multiplier for how much 'danger' is accumulated. Higer generally makes it possible for more dangerous events to be picked.
|
||||
// Multiplier for how much 'danger' is accumulated. Higher generally makes it possible for more dangerous events to be picked.
|
||||
var/danger_modifier = 1.0
|
||||
|
||||
// Ditto. Higher numbers generally result in more events occuring in a round.
|
||||
// Ditto. Higher numbers generally result in more events occurring in a round.
|
||||
var/staleness_modifier = 1.0
|
||||
|
||||
var/decision_cooldown_lower_bound = 5 MINUTES // Lower bound for how long to wait until -the potential- for another event being decided.
|
||||
@@ -155,7 +155,7 @@ SUBSYSTEM_DEF(game_master)
|
||||
if(check_rights(R_ADMIN|R_EVENT|R_DEBUG))
|
||||
SSgame_master.interact(usr)
|
||||
else
|
||||
to_chat(usr, span("warning", "You do not have sufficent rights to view the GM panel, sorry."))
|
||||
to_chat(usr, span("warning", "You do not have sufficient rights to view the GM panel, sorry."))
|
||||
|
||||
/datum/controller/subsystem/game_master/proc/interact(var/client/user)
|
||||
if(!user)
|
||||
@@ -198,7 +198,7 @@ SUBSYSTEM_DEF(game_master)
|
||||
dat += href(src, list("set_danger" = 1), "\[Set\]")
|
||||
dat += "<br>"
|
||||
dat += "<i>Danger is an estimate of how chaotic the round has been so far. It is decreased passively over time, and is increased by having \
|
||||
certain chaotic events be selected, or chaotic things happen in the round. A sufficently high amount of danger will make the system \
|
||||
certain chaotic events be selected, or chaotic things happen in the round. A sufficiently high amount of danger will make the system \
|
||||
avoid using destructive events, to avoid pushing the station over the edge.</i><br>"
|
||||
|
||||
dat += "<h2>Player Activity:</h2>"
|
||||
@@ -330,7 +330,7 @@ SUBSYSTEM_DEF(game_master)
|
||||
return
|
||||
|
||||
if(!check_rights(R_ADMIN|R_EVENT|R_DEBUG))
|
||||
message_admins("[usr] has attempted to modify the Game Master values without sufficent privilages.")
|
||||
message_admins("[usr] has attempted to modify the Game Master values without sufficient privileges.")
|
||||
return
|
||||
|
||||
if(href_list["toggle"])
|
||||
|
||||
@@ -103,7 +103,7 @@ SUBSYSTEM_DEF(job)
|
||||
job_titles += J
|
||||
return job_titles
|
||||
|
||||
job_debug_message("Was asked to get job titles for a non-existant department '[target_department_name]'.")
|
||||
job_debug_message("Was asked to get job titles for a non-existent department '[target_department_name]'.")
|
||||
return list()
|
||||
|
||||
// Returns a reference to the primary department datum that a job is in.
|
||||
|
||||
@@ -52,7 +52,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
/datum/controller/subsystem/mapping/proc/load_map_templates()
|
||||
for(var/T in subtypesof(/datum/map_template))
|
||||
var/datum/map_template/template = T
|
||||
if(!(initial(template.mappath))) // If it's missing the actual path its probably a base type or being used for inheritence.
|
||||
if(!(initial(template.mappath))) // If it's missing the actual path its probably a base type or being used for inheritance.
|
||||
continue
|
||||
template = new T()
|
||||
map_templates[template.name] = template
|
||||
@@ -104,7 +104,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
for(var/zl in z_levels)
|
||||
var/turf/T = locate(1, 1, zl)
|
||||
if(!T)
|
||||
stack_trace("Submap area seeding was given a non-existant z-level ([zl]).")
|
||||
stack_trace("Submap area seeding was given a non-existent z-level ([zl]).")
|
||||
return
|
||||
|
||||
var/time_started_overall = REALTIMEOFDAY
|
||||
@@ -130,7 +130,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
CHECK_TICK
|
||||
|
||||
var/list/loaded_submap_names = list()
|
||||
var/list/template_groups_used = list() // Used to avoid spawning three seperate versions of the same PoI.
|
||||
var/list/template_groups_used = list() // Used to avoid spawning three separate versions of the same PoI.
|
||||
|
||||
log_mapload("Going to seed submaps of subtype '[desired_map_template_type]' with a budget of [budget].")
|
||||
|
||||
|
||||
@@ -36,11 +36,11 @@ SUBSYSTEM_DEF(shuttles)
|
||||
var/tmp/list/current_run // Shuttles remaining to process this fire() tick
|
||||
|
||||
/datum/controller/subsystem/shuttles/OnNew()
|
||||
global.shuttle_controller = src // TODO - Remove this! Change everything to point at SSshuttles intead
|
||||
global.shuttle_controller = src // TODO - Remove this! Change everything to point at SSshuttles instead
|
||||
|
||||
/datum/controller/subsystem/shuttles/Initialize(timeofday)
|
||||
last_landmark_registration_time = world.time
|
||||
// Find all declared shuttle datums and initailize them. (Okay, queue them for initialization a few lines further down)
|
||||
// Find all declared shuttle datums and initialize them. (Okay, queue them for initialization a few lines further down)
|
||||
for(var/shuttle_type in subtypesof(/datum/shuttle)) // This accounts for most shuttles, though away maps can queue up more.
|
||||
var/datum/shuttle/shuttle = shuttle_type
|
||||
if(initial(shuttle.category) == shuttle_type)
|
||||
|
||||
@@ -57,11 +57,11 @@ SUBSYSTEM_DEF(sqlite)
|
||||
init_schema.Execute(sqlite_object)
|
||||
sqlite_check_for_errors(init_schema, "Feedback table creation")
|
||||
|
||||
// Add more schemas below this if the SQLite DB gets expanded for things like persistant news, polls, bans, deaths, etc.
|
||||
// Add more schemas below this if the SQLite DB gets expanded for things like persistent news, polls, bans, deaths, etc.
|
||||
|
||||
// General error checking for SQLite.
|
||||
// Returns true if something went wrong. Also writes a log.
|
||||
// The desc parameter should be unique for each call, to make it easier to track down where the error occured.
|
||||
// The desc parameter should be unique for each call, to make it easier to track down where the error occurred.
|
||||
/datum/controller/subsystem/sqlite/proc/sqlite_check_for_errors(var/database/query/query_used, var/desc)
|
||||
if(query_used && query_used.ErrorMsg())
|
||||
log_debug("SQLite Error: [desc] : [query_used.ErrorMsg()]")
|
||||
|
||||
@@ -9,7 +9,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
flags = SS_NO_TICK_CHECK | SS_KEEP_TIMING
|
||||
runlevels = RUNLEVEL_LOBBY | RUNLEVEL_SETUP | RUNLEVEL_GAME | RUNLEVEL_POSTGAME // Every runlevel!
|
||||
|
||||
var/const/restart_timeout = 3 MINUTES // Default time to wait before rebooting in desiseconds.
|
||||
var/const/restart_timeout = 3 MINUTES // Default time to wait before rebooting in deciseconds.
|
||||
var/current_state = GAME_STATE_INIT // We aren't even at pregame yet // TODO replace with CURRENT_GAME_STATE
|
||||
|
||||
/* Relies upon the following globals (TODO move those in here) */
|
||||
@@ -24,7 +24,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
var/datum/game_mode/mode = null // The actual gamemode, if selected.
|
||||
|
||||
var/end_game_state = END_GAME_NOT_OVER // Track where we are ending game/round
|
||||
var/restart_timeleft // Time remaining until restart in desiseconds
|
||||
var/restart_timeleft // Time remaining until restart in deciseconds
|
||||
var/last_restart_notify // world.time of last restart warning.
|
||||
var/delay_end = FALSE // If set, the round will not restart on its own.
|
||||
|
||||
@@ -48,7 +48,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
// This global variable exists for legacy support so we don't have to rename every 'ticker' to 'SSticker' yet.
|
||||
var/global/datum/controller/subsystem/ticker/ticker
|
||||
/datum/controller/subsystem/ticker/OnNew()
|
||||
global.ticker = src // TODO - Remove this! Change everything to point at SSticker intead
|
||||
global.ticker = src // TODO - Remove this! Change everything to point at SSticker instead
|
||||
|
||||
/datum/controller/subsystem/ticker/Initialize(timeofday)
|
||||
pregame_timeleft = config.pregame_time
|
||||
@@ -519,7 +519,7 @@ var/global/datum/controller/subsystem/ticker/ticker
|
||||
if(temprole in total_antagonists) //If the role exists already, add the name to it
|
||||
total_antagonists[temprole] += ", [Mind.name]([Mind.key])"
|
||||
else
|
||||
total_antagonists.Add(temprole) //If the role doesnt exist in the list, create it and add the mob
|
||||
total_antagonists.Add(temprole) //If the role doesn't exist in the list, create it and add the mob
|
||||
total_antagonists[temprole] += ": [Mind.name]([Mind.key])"
|
||||
|
||||
//Now print them all into the log!
|
||||
|
||||
Reference in New Issue
Block a user