rej cleanup, etc.

This commit is contained in:
LetterJay
2017-05-30 23:43:14 -05:00
parent 83b4c1d8d4
commit 872b0e61fd
7 changed files with 5 additions and 45 deletions
+3 -1
View File
@@ -119,7 +119,9 @@ SUBSYSTEM_DEF(mapping)
INIT_ANNOUNCE("Loading [config.map_name]...")
TryLoadZ(config.GetFullMapPath(), FailedZs, ZLEVEL_STATION)
INIT_ANNOUNCE("Loaded station in [(REALTIMEOFDAY - start_time)/10]s!")
SSblackbox.add_details("map_name", config.map_name)
if(SSdbcore.Connect())
var/datum/DBQuery/query_round_map_name = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET map_name = '[config.map_name]' WHERE id = [GLOB.round_id]")
query_round_map_name.Execute()
if(config.minetype != "lavaland")
INIT_ANNOUNCE("WARNING: A map without lavaland set as it's minetype was loaded! This is being ignored! Update the maploader code!")
-13
View File
@@ -1,13 +0,0 @@
diff a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm (rejected hunks)
@@ -119,8 +119,9 @@ SUBSYSTEM_DEF(mapping)
INIT_ANNOUNCE("Loading [config.map_name]...")
TryLoadZ(config.GetFullMapPath(), FailedZs, ZLEVEL_STATION)
INIT_ANNOUNCE("Loaded station in [(REALTIMEOFDAY - start_time)/10]s!")
- var/datum/DBQuery/query_round_map_name = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET map_name = '[config.map_name]' WHERE id = [GLOB.round_id]")
- query_round_map_name.Execute()
+ if(SSdbcore.Connect())
+ var/datum/DBQuery/query_round_map_name = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET map_name = '[config.map_name]' WHERE id = [GLOB.round_id]")
+ query_round_map_name.Execute()
if(config.minetype != "lavaland")
INIT_ANNOUNCE("WARNING: A map without lavaland set as it's minetype was loaded! This is being ignored! Update the maploader code!")
+2
View File
@@ -60,6 +60,8 @@ SUBSYSTEM_DEF(ticker)
var/round_start_time = 0
var/list/round_start_events
var/mode_result = "undefined"
var/end_state = "undefined"
var/modevoted = FALSE //Have we sent a vote for the gamemode?
-10
View File
@@ -1,10 +0,0 @@
diff a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm (rejected hunks)
@@ -60,6 +60,8 @@ SUBSYSTEM_DEF(ticker)
var/round_start_time = 0
var/list/round_start_events
+ var/mode_result = "undefined"
+ var/end_state = "undefined"
/datum/controller/subsystem/ticker/Initialize(timeofday)
load_mode()
-10
View File
@@ -1,10 +0,0 @@
diff a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm (rejected hunks)
@@ -3,7 +3,7 @@ SUBSYSTEM_DEF(vote)
wait = 10
flags = SS_KEEP_TIMING|SS_NO_INIT
-
+
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
var/initiator = null
-1
View File
@@ -56,7 +56,6 @@
/world/proc/SetRoundID()
if(config.sql_enabled)
if(SSdbcore.Connect())
log_world("Database connection established.")
var/datum/DBQuery/query_round_start = SSdbcore.NewQuery("INSERT INTO [format_table_name("round")] (start_datetime, server_ip, server_port) VALUES (Now(), INET_ATON('[world.internet_address]'), '[world.port]')")
query_round_start.Execute()
var/datum/DBQuery/query_round_last_id = SSdbcore.NewQuery("SELECT LAST_INSERT_ID()")
-10
View File
@@ -1,10 +0,0 @@
diff a/code/world.dm b/code/world.dm (rejected hunks)
@@ -82,7 +82,7 @@
if(fexists(GLOB.config_error_log))
fcopy(GLOB.config_error_log, "[GLOB.log_directory]/config_error.log")
fdel(GLOB.config_error_log)
-
+
if(GLOB.round_id)
log_game("Round ID: [GLOB.round_id]")