Tg 2 11 sync (#215)
* first series of updates * datums * games folder * admin and atmosia stuffs * moar * mob updates borg riding * sprites and stuff * fixes for various things * oops. some missed fixes
This commit is contained in:
+50
-48
@@ -9,7 +9,6 @@
|
||||
name = "/tg/ Station 13"
|
||||
fps = 20
|
||||
visibility = 0
|
||||
|
||||
#ifdef GC_FAILURE_HARD_LOOKUP
|
||||
loop_checks = FALSE
|
||||
#endif
|
||||
@@ -17,8 +16,8 @@
|
||||
var/list/map_transition_config = MAP_TRANSITION_CONFIG
|
||||
|
||||
/world/New()
|
||||
world.log << "World loaded at [world.timeofday]"
|
||||
map_ready = 1
|
||||
world.log << "Map is ready."
|
||||
|
||||
#if (PRELOAD_RSC == 0)
|
||||
external_rsc_urls = file2list("config/external_rsc_urls.txt","\n")
|
||||
@@ -49,9 +48,6 @@ var/list/map_transition_config = MAP_TRANSITION_CONFIG
|
||||
LoadBans()
|
||||
investigate_reset()
|
||||
|
||||
if(config && config.server_name != null && config.server_suffix && world.port > 0)
|
||||
config.server_name += " #[(world.port % 1000) / 100]"
|
||||
|
||||
timezoneOffset = text2num(time2text(0,"hh")) * 36000
|
||||
|
||||
if(config.sql_enabled)
|
||||
@@ -74,7 +70,6 @@ var/list/map_transition_config = MAP_TRANSITION_CONFIG
|
||||
|
||||
Master.Setup(10, FALSE)
|
||||
|
||||
|
||||
#define IRC_STATUS_THROTTLE 50
|
||||
var/last_irc_status = 0
|
||||
|
||||
@@ -101,12 +96,13 @@ var/last_irc_status = 0
|
||||
else if("ircstatus" in input)
|
||||
if(world.time - last_irc_status < IRC_STATUS_THROTTLE)
|
||||
return
|
||||
// var/list/adm = get_admin_counts()
|
||||
// var/status = "Admins: [adm["total"]] (Active: [adm["present"]] AFK: [adm["afk"]] Stealth: [adm["stealth"]] Skipped: [adm["noflags"]]). "
|
||||
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]."
|
||||
send2irc("Status", status)
|
||||
last_irc_status = world.time
|
||||
send2maindiscord("**Server starting up** on `[config.server? "byond://[config.server]" : "byond://[world.address]:[world.port]"]`. Map is **Probably Box Station**")
|
||||
send2maindiscord("**Server starting up**. [clients.len] (Active: [get_active_player_count(0,1,0)]). Mode: [ticker.mode.name].`. Map is **Probably Box Station**")
|
||||
|
||||
else if("status" in input)
|
||||
var/list/s = list()
|
||||
@@ -121,21 +117,17 @@ var/last_irc_status = 0
|
||||
s["players"] = clients.len
|
||||
s["revision"] = revdata.commit
|
||||
s["revision_date"] = revdata.date
|
||||
|
||||
var/admins = 0
|
||||
var/mentors = 0
|
||||
for(var/client/C in clients)
|
||||
var/mentor = mentor_datums[C.ckey]
|
||||
if(mentor)
|
||||
mentors++
|
||||
if(C.holder)
|
||||
if(C.holder.fakekey)
|
||||
continue //so stealthmins aren't revealed by the hub
|
||||
admins++
|
||||
|
||||
s["gamestate"] = 1
|
||||
s["admins"] = admins
|
||||
s["mentors"] = mentors
|
||||
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
|
||||
|
||||
@@ -183,30 +175,30 @@ var/last_irc_status = 0
|
||||
else if("adminmsg" in input)
|
||||
if(!key_valid)
|
||||
return "Bad Key"
|
||||
// else
|
||||
// return IrcPm(input["adminmsg"],input["msg"],input["sender"])
|
||||
else
|
||||
return IrcPm(input["adminmsg"],input["msg"],input["sender"])
|
||||
|
||||
else if("namecheck" in input)
|
||||
if(!key_valid)
|
||||
return "Bad Key"
|
||||
// else
|
||||
// log_admin("IRC Name Check: [input["sender"]] on [input["namecheck"]]")
|
||||
// message_admins("IRC name checking on [input["namecheck"]] from [input["sender"]]")
|
||||
// return keywords_lookup(input["namecheck"],1)
|
||||
else
|
||||
log_admin("IRC Name Check: [input["sender"]] on [input["namecheck"]]")
|
||||
message_admins("IRC name checking on [input["namecheck"]] from [input["sender"]]")
|
||||
return keywords_lookup(input["namecheck"],1)
|
||||
else if("adminwho" in input)
|
||||
if(!key_valid)
|
||||
return "Bad Key"
|
||||
// else
|
||||
// return ircadminwho()
|
||||
|
||||
else
|
||||
return ircadminwho()
|
||||
|
||||
#define WORLD_REBOOT(X) world.log << "World rebooted at [world.timeofday]"; ..(X)
|
||||
/world/Reboot(var/reason, var/feedback_c, var/feedback_r, var/time)
|
||||
if (reason == 1) //special reboot, do none of the normal stuff
|
||||
if (usr)
|
||||
log_admin("[key_name(usr)] Has requested an immediate world restart via client side debugging tools")
|
||||
message_admins("[key_name_admin(usr)] Has requested an immediate world restart via client side debugging tools")
|
||||
world << "<span class='boldannounce'>Rebooting World immediately due to host request</span>"
|
||||
return ..(1)
|
||||
WORLD_REBOOT(1)
|
||||
var/delay
|
||||
if(time)
|
||||
delay = time
|
||||
@@ -215,7 +207,7 @@ var/last_irc_status = 0
|
||||
if(ticker.delay_end)
|
||||
world << "<span class='boldannounce'>An admin has delayed the round end.</span>"
|
||||
return
|
||||
world << "<span class='boldannounce'>Rebooting World in [delay/10] [delay > 10 ? "seconds" : "second"]. [reason]</span>"
|
||||
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)
|
||||
round_end_sound_sent = TRUE
|
||||
@@ -237,12 +229,12 @@ var/last_irc_status = 0
|
||||
Reboot("Map change timed out", time = 10)
|
||||
return
|
||||
OnReboot(reason, feedback_c, feedback_r, round_end_sound_sent)
|
||||
..(0)
|
||||
WORLD_REBOOT(0)
|
||||
#undef WORLD_REBOOT
|
||||
|
||||
/world/proc/OnReboot(reason, feedback_c, feedback_r, round_end_sound_sent)
|
||||
feedback_set_details("[feedback_c]","[feedback_r]")
|
||||
log_game("<span class='boldannounce'>Rebooting World. [reason]</span>")
|
||||
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
|
||||
#ifdef dellogging
|
||||
var/log = file("data/logs/del.log")
|
||||
log << time2text(world.realtime)
|
||||
@@ -251,30 +243,40 @@ var/last_irc_status = 0
|
||||
if(count > 10)
|
||||
log << "#[count]\t[index]"
|
||||
#endif
|
||||
var/soundwait = 0
|
||||
if (ticker.round_end_sound && !round_end_sound_sent)
|
||||
soundwait = 10
|
||||
for(var/thing in clients)
|
||||
var/client/C = thing
|
||||
if (!C)
|
||||
continue
|
||||
C.Export("##action=load_rsc", ticker.round_end_sound)
|
||||
spawn(soundwait/2)
|
||||
if(ticker && ticker.round_end_sound)
|
||||
world << sound(ticker.round_end_sound)
|
||||
else
|
||||
world << sound(pick('sound/AI/newroundsexy.ogg','sound/misc/apcdestroyed.ogg','sound/misc/bangindonk.ogg','sound/misc/leavingtg.ogg', 'sound/misc/its_only_game.ogg', 'sound/misc/yeehaw.ogg', 'sound/misc/disappointed.ogg')) // random end sounds!! - LastyBatsy
|
||||
if(blackbox)
|
||||
blackbox.save_all_data_to_sql()
|
||||
sleep(soundwait)
|
||||
Master.Shutdown() //run SS shutdowns
|
||||
RoundEndSound(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
|
||||
world << "<span class='boldannounce'>Rebooting world. Loading next map...</span>"
|
||||
for(var/thing in clients)
|
||||
var/client/C = thing
|
||||
if (!C)
|
||||
continue
|
||||
if(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
|
||||
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]")
|
||||
|
||||
/world/proc/RoundEndSound(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 (!round_end_sound_sent)
|
||||
for(var/thing in clients)
|
||||
var/client/C = thing
|
||||
if (!C)
|
||||
continue
|
||||
C.Export("##action=load_rsc", round_end_sound)
|
||||
else
|
||||
round_end_sound = pick(\
|
||||
'sound/roundend/newroundsexy.ogg',
|
||||
'sound/roundend/apcdestroyed.ogg',
|
||||
'sound/roundend/bangindonk.ogg',
|
||||
'sound/roundend/leavingtg.ogg',
|
||||
'sound/roundend/its_only_game.ogg',
|
||||
'sound/roundend/yeehaw.ogg',
|
||||
'sound/roundend/disappointed.ogg'\
|
||||
)
|
||||
world << sound(round_end_sound)
|
||||
|
||||
var/inerror = 0
|
||||
/world/Error(var/exception/e)
|
||||
//runtime while processing runtimes
|
||||
|
||||
Reference in New Issue
Block a user