Globalise this

This commit is contained in:
AffectedArc07
2019-04-30 21:12:09 +01:00
parent acf43fac3a
commit bdc5452609
6 changed files with 33 additions and 41 deletions
+2 -2
View File
@@ -112,8 +112,8 @@ var/syndicate_name = null
//Traitors and traitor silicons will get these. Revs will not.
var/syndicate_code_phrase//Code phrase for traitors.
var/syndicate_code_response//Code response for traitors.
GLOBAL_VAR(syndicate_code_phrase) //Code phrase for traitors.
GLOBAL_VAR(syndicate_code_response) //Code response for traitors.
/*
Should be expanded.
+4 -1
View File
@@ -83,4 +83,7 @@ GLOBAL_VAR_INIT(gametime_offset, 432000) // 12:00 in seconds
//printers shutdown if too much shit printed
var/copier_items_printed = 0
var/copier_max_items = 300
var/copier_items_printed_logged = FALSE
var/copier_items_printed_logged = FALSE
GLOBAL_VAR(map_name) // Self explanatory
+2 -3
View File
@@ -1,3 +1,2 @@
var/global/datum/datacore/data_core = null
var/map_name = "Unknown" //The name of the map that is loaded. Assigned in world/New()
// TODO: Move this to be not in its own fucking file all alone on its own
var/global/datum/datacore/data_core = null
+20 -14
View File
@@ -5,10 +5,7 @@ SUBSYSTEM_DEF(ticker)
priority = FIRE_PRIORITY_TICKER
flags = SS_KEEP_TIMING
runlevels = RUNLEVEL_LOBBY | RUNLEVEL_SETUP | RUNLEVEL_GAME
// Time ticker related vars
var/lastTickerTimeDuration
var/lastTickerTime
// Game ticker related vars
var/round_start_time = 0
var/const/restart_timeout = 600
var/current_state = GAME_STATE_STARTUP
@@ -39,25 +36,34 @@ SUBSYSTEM_DEF(ticker)
var/round_end_announced = 0 // Spam Prevention. Announce round end only once.\
/datum/controller/subsystem/ticker/Initialize()
lastTickerTime = world.timeofday
login_music = pick(\
'sound/music/thunderdome.ogg',\
'sound/music/space.ogg',\
'sound/music/title1.ogg',\
'sound/music/title2.ogg',\
'sound/music/title3.ogg',)
..()
// Setup codephrase
if(!GLOB.syndicate_code_phrase)
GLOB.syndicate_code_phrase = generate_code_phrase()
if(!GLOB.syndicate_code_response)
GLOB.syndicate_code_response = generate_code_phrase()
// Map name
if(using_map && using_map.name)
GLOB.map_name = "[using_map.name]"
else
GLOB.map_name = "Unknown"
// World name
if(config && config.server_name)
world.name = "[config.server_name]: [station_name()]"
else
world.name = station_name()
return ..()
/datum/controller/subsystem/ticker/fire()
// This code is EXTREMELY important shit for checking midnight time rollover. Dont fuck with it
var/currentTime = world.timeofday
if(currentTime < lastTickerTime)
lastTickerTimeDuration = (currentTime - (lastTickerTime - TICKS_IN_DAY)) / TICKS_IN_SECOND
else
lastTickerTimeDuration = (currentTime - lastTickerTime) / TICKS_IN_SECOND
lastTickerTime = currentTime
// Main firing sequence
switch(current_state)
if(GAME_STATE_STARTUP)
// This is ran as soon as the MC starts firing, and should only run ONCE, unless startup fails
+4 -4
View File
@@ -208,11 +208,11 @@
/datum/game_mode/proc/give_codewords(mob/living/traitor_mob)
to_chat(traitor_mob, "<U><B>The Syndicate provided you with the following information on how to identify their agents:</B></U>")
to_chat(traitor_mob, "<B>Code Phrase</B>: <span class='danger'>[syndicate_code_phrase]</span>")
to_chat(traitor_mob, "<B>Code Response</B>: <span class='danger'>[syndicate_code_response]</span>")
to_chat(traitor_mob, "<B>Code Phrase</B>: <span class='danger'>[GLOB.syndicate_code_phrase]</span>")
to_chat(traitor_mob, "<B>Code Response</B>: <span class='danger'>[GLOB.syndicate_code_response]</span>")
traitor_mob.mind.store_memory("<b>Code Phrase</b>: [syndicate_code_phrase]")
traitor_mob.mind.store_memory("<b>Code Response</b>: [syndicate_code_response]")
traitor_mob.mind.store_memory("<b>Code Phrase</b>: [GLOB.syndicate_code_phrase]")
traitor_mob.mind.store_memory("<b>Code Response</b>: [GLOB.syndicate_code_response]")
to_chat(traitor_mob, "Use the code words in the order provided, during regular conversation, to identify other agents. Proceed with caution, however, as everyone is a potential foe.")
+1 -17
View File
@@ -35,22 +35,6 @@ var/global/list/map_transition_config = MAP_TRANSITION_CONFIG
processScheduler.setup()
if(!syndicate_code_phrase)
syndicate_code_phrase = generate_code_phrase()
if(!syndicate_code_response)
syndicate_code_response = generate_code_phrase()
if(using_map && using_map.name)
map_name = "[using_map.name]"
else
map_name = "Unknown"
if(config && config.server_name)
name = "[config.server_name]: [station_name()]"
else
name = station_name()
#undef RECOMMENDED_VERSION
return
@@ -118,7 +102,7 @@ var/world_topic_spam_protect_time = world.timeofday
player_count++
s["players"] = player_count
s["admins"] = admin_count
s["map_name"] = map_name ? map_name : "Unknown"
s["map_name"] = GLOB.map_name ? GLOB.map_name : "Unknown"
if(key_valid)
if(SSticker && SSticker.mode)