mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Merge remote-tracking branch 'ParadiseSS13/master' into id_computer_demote_terminate_freejob
This commit is contained in:
@@ -62,10 +62,6 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
var/static/current_ticklimit = TICK_LIMIT_RUNNING
|
||||
|
||||
/datum/controller/master/New()
|
||||
//temporary file used to record errors with loading config, moved to log directory once logging is set up
|
||||
GLOB.config_error_log = GLOB.world_game_log = GLOB.world_runtime_log = "data/logs/config_error.log"
|
||||
load_configuration()
|
||||
// Highlander-style: there can only be one! Kill off the old and replace it with the new.
|
||||
|
||||
if(!random_seed)
|
||||
random_seed = rand(1, 1e9)
|
||||
@@ -73,6 +69,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
|
||||
var/list/_subsystems = list()
|
||||
subsystems = _subsystems
|
||||
// Highlander-style: there can only be one! Kill off the old and replace it with the new.
|
||||
if(Master != src)
|
||||
if(istype(Master))
|
||||
Recover()
|
||||
@@ -146,7 +143,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
msg = "The [BadBoy.name] subsystem was the last to fire for 2 controller restarts. It will be recovered now and disabled if it happens again."
|
||||
FireHim = TRUE
|
||||
if(3)
|
||||
msg = "The [BadBoy.name] subsystem seems to be destabilizing the MC and will be offlined."
|
||||
msg = "The [BadBoy.name] subsystem seems to be destabilizing the MC and will be offlined. <span class='info'>The following implications are now in effect: [BadBoy.offline_implications]</span>"
|
||||
BadBoy.flags |= SS_NO_FIRE
|
||||
if(msg)
|
||||
to_chat(GLOB.admins, "<span class='boldannounce'>[msg]</span>")
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
|
||||
var/static/list/failure_strikes //How many times we suspect a subsystem type has crashed the MC, 3 strikes and you're out!
|
||||
|
||||
var/offline_implications = "None" // What are the implications of this SS being offlined?
|
||||
|
||||
//Do not override
|
||||
///datum/controller/subsystem/New()
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ SUBSYSTEM_DEF(acid)
|
||||
priority = FIRE_PRIORITY_ACID
|
||||
flags = SS_NO_INIT|SS_BACKGROUND
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
offline_implications = "Objects will no longer react to acid. No immediate action is needed."
|
||||
|
||||
var/list/currentrun = list()
|
||||
var/list/processing = list()
|
||||
|
||||
@@ -5,6 +5,7 @@ SUBSYSTEM_DEF(afk)
|
||||
name = "AFK Watcher"
|
||||
wait = 300
|
||||
flags = SS_BACKGROUND
|
||||
offline_implications = "Players will no longer be marked as AFK. No immediate action is needed."
|
||||
var/list/afk_players = list() // Associative list. ckey as key and AFK state as value
|
||||
|
||||
|
||||
@@ -17,27 +18,27 @@ SUBSYSTEM_DEF(afk)
|
||||
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
|
||||
if(!H.ckey) // Useless non ckey creatures
|
||||
continue
|
||||
|
||||
var/turf/T
|
||||
|
||||
var/turf/T
|
||||
// Only players and players with the AFK watch enabled
|
||||
// No dead, unconcious, restrained, people without jobs, people on other Z levels than the station or antags
|
||||
if(!H.client || !H.client.prefs.afk_watch || !H.mind || \
|
||||
H.stat || H.restrained() || !H.job || H.mind.special_role || \
|
||||
!is_station_level((T = get_turf(H)).z)) // Assign the turf as last. Small optimization
|
||||
if(afk_players[H.ckey])
|
||||
if(afk_players[H.ckey])
|
||||
toRemove += H.ckey
|
||||
continue
|
||||
|
||||
|
||||
var/mins_afk = round(H.client.inactivity / 600)
|
||||
if(mins_afk < config.warn_afk_minimum)
|
||||
if(afk_players[H.ckey])
|
||||
toRemove += H.ckey
|
||||
continue
|
||||
|
||||
|
||||
if(!afk_players[H.ckey])
|
||||
afk_players[H.ckey] = AFK_WARNED
|
||||
warn(H, "<span class='danger'>You are AFK for [mins_afk] minutes. You will be cryod after [config.auto_cryo_afk] total minutes and fully despawned after [config.auto_despawn_afk] total minutes. Please move or click in game if you want to avoid being despawned.</span>")
|
||||
else
|
||||
else
|
||||
var/area/A = T.loc // Turfs loc is the area
|
||||
if(afk_players[H.ckey] == AFK_WARNED)
|
||||
if(mins_afk >= config.auto_cryo_afk && A.can_get_auto_cryod)
|
||||
@@ -50,14 +51,14 @@ SUBSYSTEM_DEF(afk)
|
||||
afk_players[H.ckey] = AFK_CRYOD
|
||||
msg_admins(H, mins_afk, T, "put into cryostorage")
|
||||
warn(H, "<span class='danger'>You are AFK for [mins_afk] minutes and have been moved to cryostorage. After being AFK for [config.auto_despawn_afk] total minutes you will be fully despawned. Please eject yourself (right click, eject) out of the cryostorage if you want to avoid being despawned.</span>")
|
||||
|
||||
|
||||
else if(mins_afk >= config.auto_despawn_afk)
|
||||
var/obj/machinery/cryopod/P = H.loc
|
||||
msg_admins(H, mins_afk, T, "forcefully despawned")
|
||||
warn(H, "<span class='danger'>You are have been despawned after being AFK for [mins_afk] minutes.</span>")
|
||||
toRemove += H.ckey
|
||||
P.despawn_occupant()
|
||||
|
||||
|
||||
removeFromWatchList(toRemove)
|
||||
|
||||
/datum/controller/subsystem/afk/proc/warn(mob/living/carbon/human/H, text)
|
||||
|
||||
@@ -14,6 +14,7 @@ SUBSYSTEM_DEF(air)
|
||||
wait = 5
|
||||
flags = SS_BACKGROUND
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
offline_implications = "Turfs will no longer process atmos, and all atmospheric machines (including cryotubes) will no longer function. Shuttle call recommended."
|
||||
var/cost_turfs = 0
|
||||
var/cost_groups = 0
|
||||
var/cost_highpressure = 0
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
SUBSYSTEM_DEF(alarms)
|
||||
name = "Alarms"
|
||||
init_order = INIT_ORDER_ALARMS // 2
|
||||
offline_implications = "Alarms (Power, camera, fire, etc) will no longer be checked. No immediate action is needed."
|
||||
var/datum/alarm_handler/atmosphere/atmosphere_alarm = new()
|
||||
var/datum/alarm_handler/burglar/burglar_alarm = new()
|
||||
var/datum/alarm_handler/camera/camera_alarm = new()
|
||||
|
||||
@@ -0,0 +1,263 @@
|
||||
/*
|
||||
Subsystem core for ParadiseSS13 changelogs
|
||||
Author: AffectedArc07
|
||||
|
||||
Basically this SS extracts changelogs from the past 30 days from the database, and cleanly formats them into HTML that the players can see
|
||||
It only runs the extraction on initialize to ensure that the changelog doesnt change mid round, and to reduce the amount of DB calls that need to be done
|
||||
The changelog entries are generated from the PHP scripts in tools/githubChangelogProcessor.php
|
||||
|
||||
This SS also handles the checking of player CL dates and informing them if it has changed
|
||||
|
||||
*/
|
||||
|
||||
SUBSYSTEM_DEF(changelog)
|
||||
name = "Changelog"
|
||||
flags = SS_NO_FIRE
|
||||
var/current_cl_timestamp = "0" // Timestamp is seconds since UNIX epoch (1st January 1970). ITs also a string because BYOND doesnt like big numbers.
|
||||
var/ss_ready = FALSE // Is the SS ready? We dont want to run procs if we have not generated yet
|
||||
var/list/startup_clients_button = list() // Clients who connected before initialization who need their button color updating
|
||||
var/list/startup_clients_open = list() // Clients who connected before initialization who need the CL opening
|
||||
var/changelogHTML = "" // HTML that the changelog will use to display
|
||||
|
||||
/datum/controller/subsystem/changelog/Initialize()
|
||||
// This entire subsystem relies on SQL being here.
|
||||
if(!GLOB.dbcon.IsConnected())
|
||||
return ..()
|
||||
|
||||
var/DBQuery/latest_cl_date = GLOB.dbcon.NewQuery("SELECT UNIX_TIMESTAMP(date_merged) AS ut FROM [format_table_name("changelog")] ORDER BY date_merged DESC LIMIT 1")
|
||||
if(!latest_cl_date.Execute())
|
||||
var/err = latest_cl_date.ErrorMsg()
|
||||
log_game("SQL ERROR during SSchangelog initialization L24. Error: \[[err]\]\n")
|
||||
message_admins("SQL ERROR during SSchangelog initialization L24. Error: \[[err]\]\n")
|
||||
// Abort if we cant do this
|
||||
return ..()
|
||||
|
||||
while(latest_cl_date.NextRow())
|
||||
current_cl_timestamp = latest_cl_date.item[1]
|
||||
|
||||
if(!GenerateChangelogHTML()) // if this failed to generate
|
||||
to_chat(world, "<span class='alert'>WARNING: Changelog failed to generate. Please inform a coder/server dev</span>")
|
||||
return ..()
|
||||
|
||||
ss_ready = TRUE
|
||||
// Now we can alert anyone who wanted to check the changelog
|
||||
for(var/x in startup_clients_button)
|
||||
var/client/C = x
|
||||
UpdatePlayerChangelogButton(C)
|
||||
|
||||
// Now we can alert anyone who wanted to check the changelog
|
||||
for(var/client/C in startup_clients_open)
|
||||
OpenChangelog(C)
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/controller/subsystem/changelog/proc/UpdatePlayerChangelogDate(client/C)
|
||||
if(!ss_ready)
|
||||
return // Only return here, we dont have to worry about a queue list because this will be called from ShowChangelog()
|
||||
// Technically this is only for the date but we can also do the UI button at the same time
|
||||
var/datum/preferences/P = GLOB.preferences_datums[C.ckey]
|
||||
if(P.toggles & UI_DARKMODE)
|
||||
winset(C, "rpane.changelog", "background-color=#40628a;font-color=#ffffff;font-style=none")
|
||||
else
|
||||
winset(C, "rpane.changelog", "background-color=none;font-style=none")
|
||||
C.prefs.lastchangelog = current_cl_timestamp
|
||||
var/DBQuery/updatePlayerCLTime = GLOB.dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastchangelog='[sanitizeSQL(current_cl_timestamp)]' WHERE ckey='[C.ckey]'")
|
||||
if(!updatePlayerCLTime.Execute())
|
||||
var/err = updatePlayerCLTime.ErrorMsg()
|
||||
log_game("SQL ERROR during lastchangelog updating. Error: \[[err]\]\n")
|
||||
message_admins("SQL ERROR during lastchangelog updating. Error: \[[err]\]\n")
|
||||
to_chat(C, "Couldn't update your last seen changelog, please try again later.")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/controller/subsystem/changelog/proc/UpdatePlayerChangelogButton(client/C)
|
||||
// If SQL aint even enabled, just set the button to default style
|
||||
if(!GLOB.dbcon.IsConnected())
|
||||
if(C.prefs.toggles & UI_DARKMODE)
|
||||
winset(C, "rpane.changelog", "background-color=#40628a;text-color=#FFFFFF")
|
||||
else
|
||||
winset(C, "rpane.changelog", "background-color=none;text-color=#000000")
|
||||
return
|
||||
|
||||
// If SQL is enabled but we aint ready, queue them up, and use the default style
|
||||
if(!ss_ready)
|
||||
startup_clients_button |= C
|
||||
if(C.prefs.toggles & UI_DARKMODE)
|
||||
winset(C, "rpane.changelog", "background-color=#40628a;text-color=#FFFFFF")
|
||||
else
|
||||
winset(C, "rpane.changelog", "background-color=none;text-color=#000000")
|
||||
return
|
||||
|
||||
// Sanity check to ensure clients still exist (If a client DCs mid startup this would runtime)
|
||||
if(C && C.prefs)
|
||||
// If we are ready, process the button style
|
||||
if(C.prefs.lastchangelog != current_cl_timestamp)
|
||||
winset(C, "rpane.changelog", "background-color=#bb7700;text-color=#FFFFFF;font-style=bold")
|
||||
to_chat(C, "<span class='info'>Changelog has changed since your last visit.</span>")
|
||||
else
|
||||
if(C.prefs.toggles & UI_DARKMODE)
|
||||
winset(C, "rpane.changelog", "background-color=#40628a;text-color=#FFFFFF")
|
||||
else
|
||||
winset(C, "rpane.changelog", "background-color=none;text-color=#000000")
|
||||
|
||||
|
||||
/datum/controller/subsystem/changelog/proc/OpenChangelog(client/C)
|
||||
// If SQL isnt enabled, dont even queue them, just tell them it wont work
|
||||
if(!GLOB.dbcon.IsConnected())
|
||||
to_chat(C, "<span class='notice'>This server is not running with an SQL backend. Changelog is unavailable.</span>")
|
||||
return
|
||||
|
||||
// If SQL is enabled but we aint ready, queue them up
|
||||
if(!ss_ready)
|
||||
startup_clients_open |= C
|
||||
to_chat(C, "<span class='notice'>The changelog system is still initializing. The changelog will open for you once it has initialized.</span>")
|
||||
return
|
||||
|
||||
UpdatePlayerChangelogDate(C)
|
||||
UpdatePlayerChangelogButton(C)
|
||||
|
||||
var/datum/browser/cl_popup = new(C.mob, "changelog", "Changelog", 700, 800)
|
||||
cl_popup.set_content(changelogHTML)
|
||||
cl_popup.open()
|
||||
|
||||
/client/verb/changes()
|
||||
set name = "Changelog"
|
||||
set desc = "View the changelog."
|
||||
set category = "OOC"
|
||||
// Just invoke the actual CL thing
|
||||
SSchangelog.OpenChangelog(src)
|
||||
|
||||
// Helper to turn CL types into a fontawesome icon instead of an image
|
||||
// The colors are #28a745 for green, #fd7e14 for orange, and #dc3545 for red.
|
||||
// These colours are from bootstrap and look good with black and white
|
||||
/datum/controller/subsystem/changelog/proc/Text2Icon(text)
|
||||
switch(text)
|
||||
if("FIX")
|
||||
return "<i title='Fix' class='fas fa-tools'></i></span>" // Fixes are white because while they are good, they have no negative coutnerpart
|
||||
if("WIP")
|
||||
return "<span style='color: #fd7e14;'><i title='Work In Progress' class='fas fa-hard-hat'></i></span>" // WIP stuff is orange because new code is good but its not done yet
|
||||
if("TWEAK")
|
||||
return "<i title='Tweak' class='fas fa-sliders-h'></i>" // Tweaks are white because they could be good or bad, and theres no specific add or remove
|
||||
if("SOUNDADD")
|
||||
return "<span style='color: #28a745;'><i title='Sound Added' class='fas fa-volume-up'></i></span>" // Sound additions are green because its something new
|
||||
if("SOUNDDEL")
|
||||
return "<span style='color: #dc3545;'><i title='Sound Removed' class='fas fa-volume-mute'></i></span>" // Sound removals are red because something has been removed
|
||||
if("CODEADD")
|
||||
return "<span style='color: #28a745;'><i title='Code Addition' class='fas fa-plus'></i></span>" // Code additions are green because its something new
|
||||
if("CODEDEL")
|
||||
return "<span style='color: #dc3545;'><i title='Code Removal' class='fas fa-minus'></i></span>" // Code removals are red becuase someting has been removed
|
||||
if("IMAGEADD")
|
||||
return "<span style='color: #28a745;'><i title='Image/Sprite Addition' class='fas fa-folder-plus'></i></span>" // Image additions are green because something has been added
|
||||
if("IMAGEDEL")
|
||||
return "<span style='color: #dc3545;'><i title='Image/Sprite Removal' class='fas fa-folder-minus'></i></span>" // Image removals are red because something has been removed
|
||||
if("SPELLCHECK")
|
||||
return "<i title='Spelling/Grammar Fix' class='fas fa-font'></i>" // Spellcheck is white because theres no dedicated negative to it, so theres no red for it to collate with
|
||||
if("EXPERIMENT")
|
||||
return "<span style='color: #fd7e14;'><i title='Experimental' class='fas fa-exclamation-triangle'></i></span>" // Experimental stuff is orange because while its a new feature, its unstable
|
||||
else // Just incase the DB somehow breaks
|
||||
return "<span style='color: #28a745;'><i title='Code Addition' class='fas fa-plus'></i></span>" // Same here
|
||||
|
||||
// This proc is the star of the show
|
||||
/datum/controller/subsystem/changelog/proc/GenerateChangelogHTML()
|
||||
// Modify the code below to modify the header of the changelog
|
||||
var/changelog_header = {"
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" rel="stylesheet">
|
||||
<title>ParadiseSS13 Changelog</title>
|
||||
<link rel='styelsheet' href='fontawesome.min.css'>
|
||||
<center>
|
||||
<p style='font-size: 20px'><b>Paradise Station Changelog</b></p>
|
||||
<p><a href='?src=[UID()];openPage=forum'>Forum</a> - <a href='?src=[UID()];openPage=wiki'>Wiki</a> - <a href='?src=[UID()];openPage=github'>GitHub</a></p>
|
||||
</center>
|
||||
"}
|
||||
|
||||
var/list/prs_to_process = list()
|
||||
// Grab all from last 30 days
|
||||
var/DBQuery/pr_list_query = GLOB.dbcon.NewQuery("SELECT DISTINCT pr_number FROM changelog WHERE date_merged BETWEEN NOW() - INTERVAL 30 DAY AND NOW() ORDER BY date_merged DESC")
|
||||
if(!pr_list_query.Execute())
|
||||
var/err = pr_list_query.ErrorMsg()
|
||||
log_game("SQL ERROR during CL generation L143. Error: \[[err]\]\n")
|
||||
message_admins("SQL ERROR during CL generation L143. Error: \[[err]\]\n")
|
||||
return FALSE
|
||||
|
||||
while(pr_list_query.NextRow())
|
||||
prs_to_process += text2num(pr_list_query.item[1])
|
||||
|
||||
// Load in the header
|
||||
changelogHTML += changelog_header
|
||||
|
||||
// Make blocks for all the PRs
|
||||
for(var/pr_number in prs_to_process)
|
||||
// Initial declarations
|
||||
var/pr_block = "" // HTML for the changelog section
|
||||
var/author = "" // Author of the PR
|
||||
var/merge_date = "" // Timestamp of when the PR was merged
|
||||
|
||||
// Now we gather the data from the DB
|
||||
// Also we probably dont need to sanitize the PR number but you never know
|
||||
var/DBQuery/pr_meta = GLOB.dbcon.NewQuery("SELECT author,DATE(date_merged) AS date FROM changelog WHERE pr_number = [sanitizeSQL(pr_number)] LIMIT 1")
|
||||
if(!pr_meta.Execute())
|
||||
var/err = pr_meta.ErrorMsg()
|
||||
log_game("SQL ERROR during CL generation L190. Error: \[[err]\]\n")
|
||||
message_admins("SQL ERROR during CL generation L190. Error: \[[err]\]\n")
|
||||
return FALSE
|
||||
|
||||
while(pr_meta.NextRow())
|
||||
author = pr_meta.item[1]
|
||||
merge_date = pr_meta.item[2]
|
||||
|
||||
// Now for each actual entry
|
||||
var/DBQuery/db_entries = GLOB.dbcon.NewQuery("SELECT cl_type, cl_entry FROM changelog WHERE pr_number = [sanitizeSQL(pr_number)]")
|
||||
if(!db_entries.Execute())
|
||||
var/err = db_entries.ErrorMsg()
|
||||
log_game("SQL ERROR during CL generation L204. Error: \[[err]\]\n")
|
||||
message_admins("SQL ERROR during CL generation L204. Error: \[[err]\]\n")
|
||||
return FALSE
|
||||
|
||||
|
||||
// Now we make a changelog block
|
||||
pr_block += "<div class='statusDisplay'>"
|
||||
// If the github URL in the config has a trailing slash, it doesnt matter here, thankfully github accepts having a double slash: https://github.com/org/repo//pull/1
|
||||
pr_block += "<p class='white'><a href='?src=[UID()];openPR=[pr_number]'>#[pr_number]</a> by <b>[author]</b> (Merged on [merge_date])</span>"
|
||||
|
||||
while(db_entries.NextRow())
|
||||
pr_block += "<p>[Text2Icon(db_entries.item[1])] [db_entries.item[2]]</p>"
|
||||
|
||||
pr_block += "</div><br>"
|
||||
|
||||
changelogHTML += pr_block
|
||||
|
||||
// Make sure we return TRUE so we know it worked
|
||||
return TRUE
|
||||
|
||||
|
||||
// Topic handler so that PRs and forums and stuff open in another window
|
||||
/datum/controller/subsystem/changelog/Topic(href, href_list)
|
||||
// Handler to open pages in your browser instead of inside the CL window
|
||||
// Yes usr.client is gross here but src is the subsystem
|
||||
// Takes the page to open as an argument
|
||||
if(href_list["openPage"])
|
||||
switch(href_list["openPage"])
|
||||
if("forum")
|
||||
usr.client.forum()
|
||||
if("wiki")
|
||||
// Wiki needs snowflake because it has no cancel button
|
||||
if(config.wikiurl)
|
||||
if(alert("This will open the wiki in your browser. Are you sure?",,"Yes","No")=="No")
|
||||
return
|
||||
usr.client.wiki("") // Blank arg is important here
|
||||
else
|
||||
to_chat(usr, "<span class='danger'>The Wiki URL is not set in the server configuration. Please inform the server host.</span>")
|
||||
|
||||
if("github")
|
||||
usr.client.github()
|
||||
// Takes a PR number as argument
|
||||
if(href_list["openPR"])
|
||||
if(config.githuburl)
|
||||
if(alert("This will open PR #[href_list["openPR"]] in your browser. Are you sure?",,"Yes","No")=="No")
|
||||
return
|
||||
var/url = "[config.githuburl]/pull/[href_list["openPR"]]"
|
||||
usr << link(url)
|
||||
else
|
||||
to_chat(usr, "<span class='danger'>The GitHub URL is not set in the server configuration. PRs cannot be opened from changelog view. Please inform the server host.</span>")
|
||||
|
||||
@@ -4,6 +4,7 @@ SUBSYSTEM_DEF(chat)
|
||||
wait = 1
|
||||
priority = FIRE_PRIORITY_CHAT
|
||||
init_order = INIT_ORDER_CHAT
|
||||
offline_implications = "Chat messages will no longer be cleanly queued. No immediate action is needed."
|
||||
|
||||
var/list/payload = list()
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ SUBSYSTEM_DEF(events)
|
||||
name = "Events"
|
||||
init_order = INIT_ORDER_EVENTS
|
||||
runlevels = RUNLEVEL_GAME
|
||||
offline_implications = "Random events will no longer happen. No immediate action is needed."
|
||||
// Report events at the end of the rouund
|
||||
var/report_at_round_end = 0
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ SUBSYSTEM_DEF(fires)
|
||||
priority = FIRE_PRIOTITY_BURNING
|
||||
flags = SS_NO_INIT|SS_BACKGROUND
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
offline_implications = "Objects will no longer react to fires. No immediate action is needed."
|
||||
|
||||
var/list/currentrun = list()
|
||||
var/list/processing = list()
|
||||
|
||||
@@ -5,6 +5,7 @@ SUBSYSTEM_DEF(garbage)
|
||||
flags = SS_POST_FIRE_TIMING|SS_BACKGROUND|SS_NO_INIT
|
||||
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
|
||||
init_order = INIT_ORDER_GARBAGE
|
||||
offline_implications = "Garbage collection is no longer functional, and objects will not be qdel'd. Immediate server restart recommended."
|
||||
|
||||
var/list/collection_timeout = list(0, 2 MINUTES, 10 SECONDS) // deciseconds to wait before moving something up in the queue to the next level
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ SUBSYSTEM_DEF(icon_smooth)
|
||||
wait = 1
|
||||
priority = FIRE_PRIOTITY_SMOOTHING
|
||||
flags = SS_TICKER
|
||||
offline_implications = "Objects will no longer smooth together properly. No immediate action is needed."
|
||||
|
||||
var/list/smooth_queue = list()
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ SUBSYSTEM_DEF(idlenpcpool)
|
||||
priority = FIRE_PRIORITY_IDLE_NPC
|
||||
wait = 60
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
offline_implications = "Idle simple animals will no longer process. Shuttle call recommended."
|
||||
|
||||
var/list/currentrun = list()
|
||||
var/static/list/idle_mobs_by_zlevel[][]
|
||||
@@ -39,4 +40,4 @@ SUBSYSTEM_DEF(idlenpcpool)
|
||||
if(SA.stat != DEAD)
|
||||
SA.consider_wakeup()
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -5,6 +5,7 @@ SUBSYSTEM_DEF(input)
|
||||
flags = SS_TICKER
|
||||
priority = FIRE_PRIORITY_INPUT
|
||||
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
|
||||
offline_implications = "Player input will no longer be recognised. Immediate server restart recommended."
|
||||
|
||||
var/list/macro_sets
|
||||
var/list/movement_keys
|
||||
@@ -24,7 +25,7 @@ SUBSYSTEM_DEF(input)
|
||||
// This is for when macro sets are eventualy datumized
|
||||
/datum/controller/subsystem/input/proc/setup_default_macro_sets()
|
||||
var/list/static/default_macro_sets
|
||||
|
||||
|
||||
if(default_macro_sets)
|
||||
macro_sets = default_macro_sets
|
||||
return
|
||||
|
||||
@@ -3,6 +3,7 @@ SUBSYSTEM_DEF(jobs)
|
||||
init_order = INIT_ORDER_JOBS // 12
|
||||
wait = 3000 // 5 minutes (Deciseconds)
|
||||
runlevels = RUNLEVEL_GAME
|
||||
offline_implications = "Job playtime hours will no longer be logged. No immediate action is needed."
|
||||
|
||||
//List of all jobs
|
||||
var/list/occupations = list()
|
||||
|
||||
@@ -7,6 +7,7 @@ SUBSYSTEM_DEF(lighting)
|
||||
wait = 2
|
||||
init_order = INIT_ORDER_LIGHTING
|
||||
flags = SS_TICKER
|
||||
offline_implications = "Lighting will no longer update. Shuttle call recommended."
|
||||
|
||||
/datum/controller/subsystem/lighting/stat_entry()
|
||||
..("L:[GLOB.lighting_update_lights.len]|C:[GLOB.lighting_update_corners.len]|O:[GLOB.lighting_update_objects.len]")
|
||||
|
||||
@@ -6,6 +6,7 @@ SUBSYSTEM_DEF(machines)
|
||||
name = "Machines"
|
||||
init_order = INIT_ORDER_MACHINES
|
||||
flags = SS_KEEP_TIMING
|
||||
offline_implications = "Machinery will no longer process. Shuttle call recommended."
|
||||
|
||||
var/list/processing = list()
|
||||
var/list/currentrun = list()
|
||||
|
||||
@@ -3,6 +3,7 @@ SUBSYSTEM_DEF(mobs)
|
||||
priority = FIRE_PRIORITY_MOBS
|
||||
flags = SS_KEEP_TIMING
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
offline_implications = "Mobs will no longer process. Immediate server restart recommended."
|
||||
|
||||
var/list/currentrun = list()
|
||||
var/static/list/clients_by_zlevel[][]
|
||||
|
||||
@@ -2,6 +2,7 @@ SUBSYSTEM_DEF(mob_hunt)
|
||||
name = "Nano-Mob Hunter GO Server"
|
||||
init_order = INIT_ORDER_NANOMOB
|
||||
priority = FIRE_PRIORITY_NANOMOB // Low priority, no need for MC_TICK_CHECK due to extremely low performance impact.
|
||||
offline_implications = "Nano-Mob Hunter will no longer spawn mobs. No immediate action is needed."
|
||||
var/max_normal_spawns = 15 //change this to adjust the number of normal spawns that can exist at one time. trapped spawns (from traitors) don't count towards this
|
||||
var/list/normal_spawns = list()
|
||||
var/max_trap_spawns = 15 //change this to adjust the number of trap spawns that can exist at one time. traps spawned beyond this point clear the oldest traps
|
||||
|
||||
@@ -4,6 +4,7 @@ SUBSYSTEM_DEF(nanoui)
|
||||
flags = SS_NO_INIT
|
||||
priority = FIRE_PRIORITY_NANOUI
|
||||
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
|
||||
offline_implications = "All NanoUIs will no longer process. Shuttle call recommended."
|
||||
|
||||
var/list/currentrun = list()
|
||||
var/list/open_uis = list() // A list of open UIs, grouped by src_object and ui_key.
|
||||
|
||||
@@ -4,6 +4,7 @@ SUBSYSTEM_DEF(nightshift)
|
||||
priority = FIRE_PRIORITY_NIGHTSHIFT
|
||||
wait = 600
|
||||
flags = SS_NO_TICK_CHECK
|
||||
offline_implications = "The game will no longer shift between day and night lighting. No immediate action is needed."
|
||||
|
||||
var/nightshift_active = FALSE
|
||||
var/nightshift_start_time = 702000 //7:30 PM, station time
|
||||
|
||||
@@ -3,6 +3,7 @@ SUBSYSTEM_DEF(npcpool)
|
||||
flags = SS_POST_FIRE_TIMING|SS_NO_INIT|SS_BACKGROUND
|
||||
priority = FIRE_PRIORITY_NPC
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
offline_implications = "Simple animals will no longer process. Shuttle call recommended."
|
||||
|
||||
var/list/currentrun = list()
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ SUBSYSTEM_DEF(overlays)
|
||||
wait = 1
|
||||
priority = FIRE_PRIORITY_OVERLAYS
|
||||
init_order = INIT_ORDER_OVERLAY
|
||||
offline_implications = "Overlays may look strange. No immediate action is needed."
|
||||
|
||||
var/list/queue
|
||||
var/list/stats
|
||||
|
||||
@@ -4,6 +4,7 @@ SUBSYSTEM_DEF(parallax)
|
||||
flags = SS_POST_FIRE_TIMING | SS_BACKGROUND
|
||||
priority = FIRE_PRIORITY_PARALLAX
|
||||
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
|
||||
offline_implications = "Space parallax will no longer move around. No immediate action is needed."
|
||||
var/list/currentrun
|
||||
var/planet_x_offset = 128
|
||||
var/planet_y_offset = 128
|
||||
|
||||
@@ -54,7 +54,7 @@ SUBSYSTEM_DEF(radio)
|
||||
// If the above switch somehow failed. And it needs the SSradio. part otherwise it fails to compile
|
||||
if(frequency in DEPT_FREQS)
|
||||
return "deptradio"
|
||||
|
||||
|
||||
// If its none of the others
|
||||
return "radio"
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
init_order = INIT_ORDER_SHUTTLE
|
||||
flags = SS_KEEP_TIMING|SS_NO_TICK_CHECK
|
||||
runlevels = RUNLEVEL_SETUP | RUNLEVEL_GAME
|
||||
offline_implications = "Shuttles will no longer function and cargo will not generate points. Immediate server restart recommended."
|
||||
var/list/mobile = list()
|
||||
var/list/stationary = list()
|
||||
var/list/transit = list()
|
||||
|
||||
@@ -4,6 +4,7 @@ SUBSYSTEM_DEF(spacedrift)
|
||||
wait = 5
|
||||
flags = SS_NO_INIT|SS_KEEP_TIMING
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
offline_implications = "Mobs will no longer respect a lack of gravity. No immediate action is needed."
|
||||
|
||||
var/list/currentrun = list()
|
||||
var/list/processing = list()
|
||||
|
||||
@@ -3,6 +3,7 @@ SUBSYSTEM_DEF(sun)
|
||||
wait = 600
|
||||
flags = SS_NO_TICK_CHECK
|
||||
init_order = INIT_ORDER_SUN
|
||||
offline_implications = "Solar panels will no longer rotate. No immediate action is needed."
|
||||
var/angle
|
||||
var/dx
|
||||
var/dy
|
||||
|
||||
@@ -7,6 +7,7 @@ SUBSYSTEM_DEF(throwing)
|
||||
wait = 1
|
||||
flags = SS_NO_INIT|SS_KEEP_TIMING|SS_TICKER
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
offline_implications = "Thrown objects may not react properly. Shuttle call recommended."
|
||||
|
||||
var/list/currentrun
|
||||
var/list/processing = list()
|
||||
|
||||
@@ -5,6 +5,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
priority = FIRE_PRIORITY_TICKER
|
||||
flags = SS_KEEP_TIMING
|
||||
runlevels = RUNLEVEL_LOBBY | RUNLEVEL_SETUP | RUNLEVEL_GAME
|
||||
offline_implications = "The game is no longer aware of when the round ends. Immediate server restart recommended."
|
||||
|
||||
var/round_start_time = 0
|
||||
var/const/restart_timeout = 600
|
||||
@@ -23,9 +24,6 @@ SUBSYSTEM_DEF(ticker)
|
||||
var/Bible_deity_name
|
||||
var/datum/cult_info/cultdat = null //here instead of cult for adminbus purposes
|
||||
var/random_players = 0 // if set to nonzero, ALL players who latejoin or declare-ready join will have random appearances/genders
|
||||
var/list/syndicate_coalition = list() // list of traitor-compatible factions
|
||||
var/list/factions = list() // list of all factions
|
||||
var/list/availablefactions = list() // list of factions with openings
|
||||
var/tipped = FALSE //Did we broadcast the tip of the day yet?
|
||||
var/selected_tip // What will be the tip of the day?
|
||||
var/pregame_timeleft // This is used for calculations
|
||||
@@ -97,7 +95,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
mode.check_finished() // some modes contain var-changing code in here, so call even if we don't uses result
|
||||
else
|
||||
game_finished |= mode.check_finished()
|
||||
if(game_finished)
|
||||
if(game_finished || force_ending)
|
||||
current_state = GAME_STATE_FINISHED
|
||||
if(GAME_STATE_FINISHED)
|
||||
current_state = GAME_STATE_FINISHED
|
||||
@@ -194,7 +192,6 @@ SUBSYSTEM_DEF(ticker)
|
||||
|
||||
//here to initialize the random events nicely at round start
|
||||
setup_economy()
|
||||
setupfactions()
|
||||
|
||||
//shuttle_controller.setup_shuttle_docks()
|
||||
|
||||
@@ -309,15 +306,12 @@ SUBSYSTEM_DEF(ticker)
|
||||
cinematic.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
cinematic.screen_loc = "1,0"
|
||||
|
||||
var/obj/structure/bed/temp_buckle = new(src)
|
||||
if(station_missed)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
M.buckled = temp_buckle //buckles the mob so it can't do anything
|
||||
if(M.client)
|
||||
M.client.screen += cinematic //show every client the cinematic
|
||||
else //nuke kills everyone on z-level 1 to prevent "hurr-durr I survived"
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
M.buckled = temp_buckle
|
||||
if(M.stat != DEAD)
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && is_station_level(T.z) && !istype(M.loc, /obj/structure/closet/secure_closet/freezer))
|
||||
@@ -387,8 +381,6 @@ SUBSYSTEM_DEF(ticker)
|
||||
//Otherwise if its a verb it will continue on afterwards.
|
||||
spawn(300)
|
||||
QDEL_NULL(cinematic) //end the cinematic
|
||||
if(temp_buckle)
|
||||
qdel(temp_buckle) //release everybody
|
||||
|
||||
|
||||
|
||||
@@ -442,12 +434,6 @@ SUBSYSTEM_DEF(ticker)
|
||||
if(m)
|
||||
to_chat(world, "<span class='purple'><b>Tip of the round: </b>[html_encode(m)]</span>")
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/getfactionbyname(var/name)
|
||||
for(var/datum/faction/F in factions)
|
||||
if(F.name == name)
|
||||
return F
|
||||
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/declare_completion()
|
||||
GLOB.nologevent = 1 //end of round murder and shenanigans are legal; there's no need to jam up attack logs past this point.
|
||||
//Round statistics report
|
||||
@@ -518,6 +504,11 @@ SUBSYSTEM_DEF(ticker)
|
||||
//Ask the event manager to print round end information
|
||||
SSevents.RoundEnd()
|
||||
|
||||
//make big obvious note in game logs that round ended
|
||||
log_game("///////////////////////////////////////////////////////")
|
||||
log_game("///////////////////// ROUND ENDED /////////////////////")
|
||||
log_game("///////////////////////////////////////////////////////")
|
||||
|
||||
// Add AntagHUD to everyone, see who was really evil the whole time!
|
||||
for(var/datum/atom_hud/antag/H in GLOB.huds)
|
||||
for(var/m in GLOB.player_list)
|
||||
|
||||
@@ -9,6 +9,7 @@ SUBSYSTEM_DEF(timer)
|
||||
init_order = INIT_ORDER_TIMER
|
||||
|
||||
flags = SS_TICKER|SS_NO_INIT
|
||||
offline_implications = "The game will no longer process timers. Immediate server restart recommended."
|
||||
|
||||
var/list/second_queue = list() //awe, yes, you've had first queue, but what about second queue?
|
||||
var/list/hashes = list()
|
||||
|
||||
@@ -3,6 +3,7 @@ SUBSYSTEM_DEF(vote)
|
||||
wait = 10
|
||||
flags = SS_KEEP_TIMING|SS_NO_INIT
|
||||
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
|
||||
offline_implications = "Votes (Endround shuttle) will no longer function. Shuttle call recommended."
|
||||
|
||||
var/initiator = null
|
||||
var/started_time = null
|
||||
|
||||
@@ -9,6 +9,7 @@ SUBSYSTEM_DEF(weather)
|
||||
flags = SS_BACKGROUND
|
||||
wait = 10
|
||||
runlevels = RUNLEVEL_GAME
|
||||
offline_implications = "Ash storms will no longer trigger. No immediate action is needed."
|
||||
var/list/processing = list()
|
||||
var/list/eligible_zlevels = list()
|
||||
var/list/next_hit_by_zlevel = list() //Used by barometers to know when the next storm is coming
|
||||
|
||||
Reference in New Issue
Block a user