April sync (#360)
* Maps and things no code/icons * helpers defines globalvars * Onclick world.dm orphaned_procs * subsystems Round vote and shuttle autocall done here too * datums * Game folder * Admin - chatter modules * clothing - mining * modular computers - zambies * client * mob level 1 * mob stage 2 + simple_animal * silicons n brains * mob stage 3 + Alien/Monkey * human mobs * icons updated * some sounds * emitter y u no commit * update tgstation.dme * compile fixes * travis fixes Also removes Fast digest mode, because reasons. * tweaks for travis Mentors are broke again Also fixes Sizeray guns * oxygen loss fix for vore code. * removes unused code * some code updates * bulk fixes * further fixes * outside things * whoops. * Maint bar ported * GLOBs.
This commit is contained in:
@@ -155,7 +155,7 @@ Actual Adjacent procs :
|
||||
var/list/L = new()
|
||||
var/turf/T
|
||||
|
||||
for(var/dir in cardinal)
|
||||
for(var/dir in GLOB.cardinal)
|
||||
T = get_step(src,dir)
|
||||
if(simulated_only && !istype(T))
|
||||
continue
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
|
||||
// Deprecated! See global.dm for new configuration vars
|
||||
/*
|
||||
var/DB_SERVER = "" // This is the location of your MySQL server (localhost is USUALLY fine)
|
||||
var/DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is the default)
|
||||
var/DB_SERVER = "" // This is the location of your MySQL server (localhost is USUALLY fine)
|
||||
var/DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is the default)
|
||||
*/
|
||||
|
||||
DBConnection
|
||||
@@ -63,11 +63,11 @@ DBConnection/proc/Connect()
|
||||
if(failed_connections > FAILED_DB_CONNECTION_CUTOFF) //If it failed to establish a connection more than 5 times in a row, don't bother attempting to connect anymore.
|
||||
return FALSE
|
||||
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
var/user = GLOB.sqlfdbklogin
|
||||
var/pass = GLOB.sqlfdbkpass
|
||||
var/db = GLOB.sqlfdbkdb
|
||||
var/address = GLOB.sqladdress
|
||||
var/port = GLOB.sqlport
|
||||
|
||||
doConnect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
. = IsConnected()
|
||||
@@ -98,7 +98,7 @@ DBConnection/proc/ErrorMsg() return _dm_db_error_msg(_db_con)
|
||||
DBConnection/proc/SelectDB(database_name,dbi)
|
||||
if(IsConnected()) Disconnect()
|
||||
//return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[DB_SERVER]:[DB_PORT]"]",user,password)
|
||||
return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[sqladdress]:[sqlport]"]",user,password)
|
||||
return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[GLOB.sqladdress]:[GLOB.sqlport]"]",user,password)
|
||||
DBConnection/proc/NewQuery(sql_query,cursor_handler=src.default_cursor) return new/DBQuery(sql_query,src,cursor_handler)
|
||||
|
||||
|
||||
|
||||
@@ -10,21 +10,21 @@
|
||||
announcement += "<br><h2 class='alert'>[html_encode(title)]</h2>"
|
||||
else if(type == "Captain")
|
||||
announcement += "<h1 class='alert'>Captain Announces</h1>"
|
||||
news_network.SubmitArticle(text, "Captain's Announcement", "Station Announcements", null)
|
||||
GLOB.news_network.SubmitArticle(text, "Captain's Announcement", "Station Announcements", null)
|
||||
|
||||
else
|
||||
announcement += "<h1 class='alert'>[command_name()] Update</h1>"
|
||||
if (title && length(title) > 0)
|
||||
announcement += "<br><h2 class='alert'>[html_encode(title)]</h2>"
|
||||
if(title == "")
|
||||
news_network.SubmitArticle(text, "Central Command Update", "Station Announcements", null)
|
||||
GLOB.news_network.SubmitArticle(text, "Central Command Update", "Station Announcements", null)
|
||||
else
|
||||
news_network.SubmitArticle(title + "<br><br>" + text, "Central Command", "Station Announcements", null)
|
||||
GLOB.news_network.SubmitArticle(title + "<br><br>" + text, "Central Command", "Station Announcements", null)
|
||||
|
||||
announcement += "<br><span class='alert'>[html_encode(text)]</span><br>"
|
||||
announcement += "<br>"
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(!isnewplayer(M) && !M.ear_deaf)
|
||||
to_chat(M, announcement)
|
||||
if(M.client.prefs.toggles & SOUND_ANNOUNCEMENTS)
|
||||
@@ -37,7 +37,7 @@
|
||||
if(announce)
|
||||
priority_announce("A report has been downloaded and printed out at all communications consoles.", "Incoming Classified Message", 'sound/AI/commandreport.ogg')
|
||||
|
||||
for(var/obj/machinery/computer/communications/C in machines)
|
||||
for(var/obj/machinery/computer/communications/C in GLOB.machines)
|
||||
if(!(C.stat & (BROKEN|NOPOWER)) && C.z == ZLEVEL_STATION)
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(C.loc)
|
||||
P.name = "paper - '[title]'"
|
||||
@@ -50,7 +50,7 @@
|
||||
if(!message)
|
||||
return
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(!isnewplayer(M) && !M.ear_deaf)
|
||||
to_chat(M, "<b><font size = 3><font color = red>[title]</font color><BR>[message]</font size></b><BR>")
|
||||
if(M.client.prefs.toggles & SOUND_ANNOUNCEMENTS)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/datum/feedback/blackbox = new()
|
||||
GLOBAL_DATUM_INIT(blackbox, /datum/feedback, new)
|
||||
|
||||
//the feedback datum; stores all feedback
|
||||
/datum/feedback
|
||||
@@ -33,7 +33,7 @@ var/datum/feedback/blackbox = new()
|
||||
var/pda_msg_amt = 0
|
||||
var/rc_msg_amt = 0
|
||||
|
||||
for (var/obj/machinery/message_server/MS in message_servers)
|
||||
for (var/obj/machinery/message_server/MS in GLOB.message_servers)
|
||||
if (MS.pda_msgs.len > pda_msg_amt)
|
||||
pda_msg_amt = MS.pda_msgs.len
|
||||
if (MS.rc_msgs.len > rc_msg_amt)
|
||||
@@ -62,10 +62,10 @@ var/datum/feedback/blackbox = new()
|
||||
if (!feedback) return
|
||||
|
||||
round_end_data_gathering() //round_end time logging and some other data processing
|
||||
if (!dbcon.Connect()) return
|
||||
if (!GLOB.dbcon.Connect()) return
|
||||
var/round_id
|
||||
|
||||
var/DBQuery/query_feedback_max_id = dbcon.NewQuery("SELECT MAX(round_id) AS round_id FROM [format_table_name("feedback")]")
|
||||
var/DBQuery/query_feedback_max_id = GLOB.dbcon.NewQuery("SELECT MAX(round_id) AS round_id FROM [format_table_name("feedback")]")
|
||||
if(!query_feedback_max_id.Execute())
|
||||
return
|
||||
while (query_feedback_max_id.NextRow())
|
||||
@@ -86,15 +86,15 @@ var/datum/feedback/blackbox = new()
|
||||
if (sqlrowlist == "")
|
||||
return
|
||||
|
||||
var/DBQuery/query_feedback_save = dbcon.NewQuery("INSERT DELAYED IGNORE INTO [format_table_name("feedback")] VALUES " + sqlrowlist)
|
||||
var/DBQuery/query_feedback_save = GLOB.dbcon.NewQuery("INSERT DELAYED IGNORE INTO [format_table_name("feedback")] VALUES " + sqlrowlist)
|
||||
query_feedback_save.Execute()
|
||||
|
||||
|
||||
/proc/feedback_set(variable,value)
|
||||
if(!blackbox)
|
||||
if(!GLOB.blackbox)
|
||||
return
|
||||
|
||||
var/datum/feedback_variable/FV = blackbox.find_feedback_datum(variable)
|
||||
var/datum/feedback_variable/FV = GLOB.blackbox.find_feedback_datum(variable)
|
||||
|
||||
if(!FV)
|
||||
return
|
||||
@@ -102,10 +102,10 @@ var/datum/feedback/blackbox = new()
|
||||
FV.set_value(value)
|
||||
|
||||
/proc/feedback_inc(variable,value)
|
||||
if(!blackbox)
|
||||
if(!GLOB.blackbox)
|
||||
return
|
||||
|
||||
var/datum/feedback_variable/FV = blackbox.find_feedback_datum(variable)
|
||||
var/datum/feedback_variable/FV = GLOB.blackbox.find_feedback_datum(variable)
|
||||
|
||||
if(!FV)
|
||||
return
|
||||
@@ -113,10 +113,10 @@ var/datum/feedback/blackbox = new()
|
||||
FV.inc(value)
|
||||
|
||||
/proc/feedback_dec(variable,value)
|
||||
if(!blackbox)
|
||||
if(!GLOB.blackbox)
|
||||
return
|
||||
|
||||
var/datum/feedback_variable/FV = blackbox.find_feedback_datum(variable)
|
||||
var/datum/feedback_variable/FV = GLOB.blackbox.find_feedback_datum(variable)
|
||||
|
||||
if(!FV)
|
||||
return
|
||||
@@ -124,10 +124,10 @@ var/datum/feedback/blackbox = new()
|
||||
FV.dec(value)
|
||||
|
||||
/proc/feedback_set_details(variable,details)
|
||||
if(!blackbox)
|
||||
if(!GLOB.blackbox)
|
||||
return
|
||||
|
||||
var/datum/feedback_variable/FV = blackbox.find_feedback_datum(variable)
|
||||
var/datum/feedback_variable/FV = GLOB.blackbox.find_feedback_datum(variable)
|
||||
|
||||
if(!FV)
|
||||
return
|
||||
@@ -135,10 +135,10 @@ var/datum/feedback/blackbox = new()
|
||||
FV.set_details(details)
|
||||
|
||||
/proc/feedback_add_details(variable,details)
|
||||
if(!blackbox)
|
||||
if(!GLOB.blackbox)
|
||||
return
|
||||
|
||||
var/datum/feedback_variable/FV = blackbox.find_feedback_datum(variable)
|
||||
var/datum/feedback_variable/FV = GLOB.blackbox.find_feedback_datum(variable)
|
||||
|
||||
if(!FV)
|
||||
return
|
||||
@@ -209,20 +209,20 @@ var/datum/feedback/blackbox = new()
|
||||
/proc/sql_poll_population()
|
||||
if(!config.sql_enabled)
|
||||
return
|
||||
if(!dbcon.Connect())
|
||||
if(!GLOB.dbcon.Connect())
|
||||
return
|
||||
var/playercount = 0
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.client)
|
||||
playercount += 1
|
||||
var/admincount = admins.len
|
||||
var/DBQuery/query_record_playercount = dbcon.NewQuery("INSERT INTO [format_table_name("legacy_population")] (playercount, admincount, time, server_ip, server_port) VALUES ([playercount], [admincount], '[SQLtime()], INET_ATON('[world.internet_address]'), '[world.port]')")
|
||||
var/admincount = GLOB.admins.len
|
||||
var/DBQuery/query_record_playercount = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("legacy_population")] (playercount, admincount, time, server_ip, server_port) VALUES ([playercount], [admincount], '[SQLtime()]', INET_ATON('[world.internet_address]'), '[world.port]')")
|
||||
query_record_playercount.Execute()
|
||||
|
||||
/proc/sql_report_death(mob/living/L)
|
||||
if(!config.sql_enabled)
|
||||
return
|
||||
if(!dbcon.Connect())
|
||||
if(!GLOB.dbcon.Connect())
|
||||
return
|
||||
if(!L || !L.key || !L.mind)
|
||||
return
|
||||
@@ -249,5 +249,5 @@ var/datum/feedback/blackbox = new()
|
||||
var/sqlstamina = sanitizeSQL(L.getStaminaLoss())
|
||||
var/coord = sanitizeSQL("[L.x], [L.y], [L.z]")
|
||||
var/map = sanitizeSQL(SSmapping.config.map_name)
|
||||
var/DBQuery/query_report_death = dbcon.NewQuery("INSERT INTO [format_table_name("death")] (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, toxloss, cloneloss, staminaloss, coord, mapname, server_ip, server_port) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[SQLtime()]', '[laname]', '[lakey]', '[sqlgender]', [sqlbrute], [sqlfire], [sqlbrain], [sqloxy], [sqltox], [sqlclone], [sqlstamina], '[coord]', '[map]', INET_ATON('[world.internet_address]'), '[world.port]')")
|
||||
var/DBQuery/query_report_death = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("death")] (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, toxloss, cloneloss, staminaloss, coord, mapname, server_ip, server_port) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[SQLtime()]', '[laname]', '[lakey]', '[sqlgender]', [sqlbrute], [sqlfire], [sqlbrain], [sqloxy], [sqltox], [sqlclone], [sqlstamina], '[coord]', '[map]', INET_ATON('[world.internet_address]'), '[world.port]')")
|
||||
query_report_death.Execute()
|
||||
|
||||
Reference in New Issue
Block a user