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:
Poojawa
2017-04-13 23:37:00 -05:00
committed by GitHub
parent cdc32c98fa
commit 7e9b96a00f
1322 changed files with 174827 additions and 23888 deletions
+52 -52
View File
@@ -27,16 +27,16 @@
#endif
//logs
var/date_string = time2text(world.realtime, "YYYY/MM-Month/DD-Day")
href_logfile = file("data/logs/[date_string] hrefs.htm")
diary = file("data/logs/[date_string].log")
diaryofmeanpeople = file("data/logs/[date_string] Attack.log")
diary << "\n\nStarting up. [time_stamp()]\n---------------------"
diaryofmeanpeople << "\n\nStarting up. [time_stamp()]\n---------------------"
changelog_hash = md5('html/changelog.html') //used for telling if the changelog has changed recently
GLOB.href_logfile = file("data/logs/[date_string] hrefs.htm")
GLOB.diary = file("data/logs/[date_string].log")
GLOB.diaryofmeanpeople = file("data/logs/[date_string] Attack.log")
GLOB.diary << "\n\nStarting up. [time_stamp()]\n---------------------"
GLOB.diaryofmeanpeople << "\n\nStarting up. [time_stamp()]\n---------------------"
GLOB.changelog_hash = md5('html/changelog.html') //used for telling if the changelog has changed recently
make_datum_references_lists() //initialises global lists for referencing frequently used datums (so that we only ever do it once)
load_configuration()
revdata.DownloadPRDetails()
GLOB.revdata.DownloadPRDetails()
load_mode()
load_motd()
load_admins()
@@ -46,37 +46,37 @@
LoadBans()
investigate_reset()
timezoneOffset = text2num(time2text(0,"hh")) * 36000
GLOB.timezoneOffset = text2num(time2text(0,"hh")) * 36000
if(config.sql_enabled)
if(!dbcon.Connect())
if(!GLOB.dbcon.Connect())
log_world("Your server failed to establish a connection with the database.")
else
log_world("Database connection established.")
data_core = new /datum/datacore()
GLOB.data_core = new /datum/datacore()
Master.Initialize(10, FALSE)
#define IRC_STATUS_THROTTLE 50
/world/Topic(T, addr, master, key)
if(config && config.log_world_topic)
diary << "TOPIC: \"[T]\", from:[addr], master:[master], key:[key]"
GLOB.diary << "TOPIC: \"[T]\", from:[addr], master:[master], key:[key]"
var/list/input = params2list(T)
var/key_valid = (global.comms_allowed && input["key"] == global.comms_key)
var/key_valid = (GLOB.comms_allowed && input["key"] == GLOB.comms_key)
var/static/last_irc_status = 0
if("ping" in input)
var/x = 1
for (var/client/C in clients)
for (var/client/C in GLOB.clients)
x++
return x
else if("players" in input)
var/n = 0
for(var/mob/M in player_list)
for(var/mob/M in GLOB.player_list)
if(M.client)
n++
return n
@@ -87,40 +87,40 @@
var/list/adm = get_admin_counts()
var/list/allmins = adm["total"]
var/status = "Admins: [allmins.len] (Active: [english_list(adm["present"])] AFK: [english_list(adm["afk"])] Stealth: [english_list(adm["stealth"])] Skipped: [english_list(adm["noflags"])]). "
status += "Players: [clients.len] (Active: [get_active_player_count(0,1,0)]). Mode: [ticker.mode.name]."
status += "Players: [GLOB.clients.len] (Active: [get_active_player_count(0,1,0)]). Mode: [SSticker.mode.name]."
send2irc("Status", status)
last_irc_status = world.time
else if("status" in input)
var/list/s = list()
s["version"] = game_version
s["mode"] = master_mode
s["respawn"] = config ? abandon_allowed : 0
s["enter"] = enter_allowed
s["version"] = GLOB.game_version
s["mode"] = GLOB.master_mode
s["respawn"] = config ? GLOB.abandon_allowed : 0
s["enter"] = GLOB.enter_allowed
s["vote"] = config.allow_vote_mode
s["ai"] = config.allow_ai
s["host"] = host ? host : null
s["active_players"] = get_active_player_count()
s["players"] = clients.len
s["revision"] = revdata.commit
s["revision_date"] = revdata.date
s["players"] = GLOB.clients.len
s["revision"] = GLOB.revdata.commit
s["revision_date"] = GLOB.revdata.date
var/list/adm = get_admin_counts()
var/list/presentmins = adm["present"]
var/list/afkmins = adm["afk"]
s["admins"] = presentmins.len + afkmins.len //equivalent to the info gotten from adminwho
s["gamestate"] = 1
if(ticker)
s["gamestate"] = ticker.current_state
if(SSticker)
s["gamestate"] = SSticker.current_state
s["map_name"] = SSmapping.config.map_name
if(key_valid && ticker && ticker.mode)
s["real_mode"] = ticker.mode.name
if(key_valid && SSticker && SSticker.mode)
s["real_mode"] = SSticker.mode.name
// Key-authed callers may know the truth behind the "secret"
s["security_level"] = get_security_level()
s["round_duration"] = round((world.time-round_start_time)/10)
s["round_duration"] = SSticker ? round((world.time-SSticker.round_start_time)/10) : 0
// Amount of world's ticks in seconds, useful for calculating round duration
if(SSshuttle && SSshuttle.emergency)
@@ -136,7 +136,7 @@
return "Bad Key"
else
#define CHAT_PULLR 64 //defined in preferences.dm, but not available here at compilation time
for(var/client/C in clients)
for(var/client/C in GLOB.clients)
if(C.prefs && (C.prefs.chat_toggles & CHAT_PULLR))
to_chat(C, "<span class='announce'>PR: [input["announce"]]</span>")
#undef CHAT_PULLR
@@ -149,7 +149,7 @@
relay_msg_admins("<span class='adminnotice'><b><font color=red>HELP: </font> [input["source"]] [input["message_sender"]]: [input["message"]]</b></span>")
if(input["crossmessage"] == "Comms_Console")
minor_announce(input["message"], "Incoming message from [input["message_sender"]]")
for(var/obj/machinery/computer/communications/CM in machines)
for(var/obj/machinery/computer/communications/CM in GLOB.machines)
CM.overrideCooldown()
if(input["crossmessage"] == "News_Report")
minor_announce(input["message"], "Breaking Update From [input["message_sender"]]")
@@ -188,20 +188,20 @@
delay = time
else
delay = config.round_end_countdown * 10
if(ticker.delay_end)
if(SSticker.delay_end)
to_chat(world, "<span class='boldannounce'>An admin has delayed the round end.</span>")
return
to_chat(world, "<span class='boldannounce'>Rebooting World in [delay/10] [(delay >= 10 && delay < 20) ? "second" : "seconds"]. [reason]</span>")
var/round_end_sound_sent = FALSE
if(ticker.round_end_sound)
if(SSticker.round_end_sound)
round_end_sound_sent = TRUE
for(var/thing in clients)
for(var/thing in GLOB.clients)
var/client/C = thing
if (!C)
continue
C.Export("##action=load_rsc", ticker.round_end_sound)
C.Export("##action=load_rsc", SSticker.round_end_sound)
sleep(delay)
if(ticker.delay_end)
if(SSticker.delay_end)
to_chat(world, "<span class='boldannounce'>Reboot was cancelled by an admin.</span>")
return
OnReboot(reason, feedback_c, feedback_r, round_end_sound_sent)
@@ -219,13 +219,13 @@
if(count > 10)
log << "#[count]\t[index]"
#endif
if(blackbox)
blackbox.save_all_data_to_sql()
if(GLOB.blackbox)
GLOB.blackbox.save_all_data_to_sql()
Master.Shutdown() //run SS shutdowns
RoundEndAnimation(round_end_sound_sent)
kick_clients_in_lobby("<span class='boldannounce'>The round came to an end with you in the lobby.</span>", 1) //second parameter ensures only afk clients are kicked
to_chat(world, "<span class='boldannounce'>Rebooting world...</span>")
for(var/thing in clients)
for(var/thing in GLOB.clients)
var/client/C = thing
if(C && config.server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite
C << link("byond://[config.server]")
@@ -233,10 +233,10 @@
/world/proc/RoundEndAnimation(round_end_sound_sent)
set waitfor = FALSE
var/round_end_sound
if(!ticker && ticker.round_end_sound)
round_end_sound = ticker.round_end_sound
if(!SSticker && SSticker.round_end_sound)
round_end_sound = SSticker.round_end_sound
if (!round_end_sound_sent)
for(var/thing in clients)
for(var/thing in GLOB.clients)
var/client/C = thing
if (!C)
continue
@@ -252,7 +252,7 @@
'sound/roundend/disappointed.ogg'\
)
for(var/thing in clients)
for(var/thing in GLOB.clients)
var/obj/screen/splash/S = new(thing, FALSE)
S.Fade(FALSE,FALSE)
@@ -262,8 +262,8 @@
var/list/Lines = file2list("data/mode.txt")
if(Lines.len)
if(Lines[1])
master_mode = Lines[1]
diary << "Saved mode is '[master_mode]'"
GLOB.master_mode = Lines[1]
GLOB.diary << "Saved mode is '[GLOB.master_mode]'"
/world/proc/save_mode(the_mode)
var/F = file("data/mode.txt")
@@ -271,7 +271,7 @@
F << the_mode
/world/proc/load_motd()
join_motd = file2text("config/motd.txt") + "<br>" + revdata.GetTestMergeInfo()
GLOB.join_motd = file2text("config/motd.txt") + "<br>" + GLOB.revdata.GetTestMergeInfo()
/world/proc/load_configuration()
config = new /datum/configuration()
@@ -282,7 +282,7 @@
config.loadmaplist("config/maps.txt")
// apply some settings from config..
abandon_allowed = config.respawn
GLOB.abandon_allowed = config.respawn
/world/proc/update_status()
@@ -301,16 +301,16 @@
var/list/features = list()
if(ticker)
if(master_mode)
features += master_mode
if(SSticker)
if(GLOB.master_mode)
features += GLOB.master_mode
else
features += "<b>STARTING</b>"
if (!enter_allowed)
if (!GLOB.enter_allowed)
features += "closed"
features += abandon_allowed ? "respawn" : "no respawn"
features += GLOB.abandon_allowed ? "respawn" : "no respawn"
if (config && config.allow_vote_mode)
features += "vote"
@@ -319,7 +319,7 @@
features += "AI allowed"
var/n = 0
for (var/mob/M in player_list)
for (var/mob/M in GLOB.player_list)
if (M.client)
n++
@@ -334,4 +334,4 @@
if (features)
s += ": [jointext(features, ", ")]"
status = s
status = s