mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
- Status query now also replies with the map name.
This commit is contained in:
@@ -8,4 +8,6 @@ var/list/powernets = list()
|
||||
|
||||
// this is not strictly unused although the whole modules datum thing is unused
|
||||
// To remove this you need to remove that
|
||||
var/datum/moduletypes/mods = new()
|
||||
var/datum/moduletypes/mods = new()
|
||||
|
||||
var/map_name = "Unknown" //The name of the map that is loaded. Assigned in world/New()
|
||||
@@ -88,6 +88,20 @@
|
||||
process_ghost_teleport_locs() //Sets up ghost teleport locations.
|
||||
sleep_offline = 1
|
||||
|
||||
var/list/lines = file2list(file('tgstation.dme'))
|
||||
for(var/l in lines)
|
||||
if( dd_hassuffix(l, ".dmm\"") )
|
||||
var/firstquote = findtext(l, "\"")
|
||||
var/lastslash = 0
|
||||
for(var/j = 1; j < length(l); j++)
|
||||
var/lastslashtest = findtext(l, "\\", -j)
|
||||
if(lastslashtest > 0)
|
||||
lastslash = lastslashtest
|
||||
break
|
||||
map_name = copytext(l, max(firstquote+1,lastslash+1), length(l)-4)
|
||||
if(!map_name)
|
||||
map_name = "Unknown"
|
||||
|
||||
spawn(3000) //so we aren't adding to the round-start lag
|
||||
if(config.kick_inactive)
|
||||
KickInactiveClients()
|
||||
@@ -149,6 +163,7 @@
|
||||
s["gamestate"] = 1
|
||||
if(ticker)
|
||||
s["gamestate"] = ticker.current_state
|
||||
s["map_name"] = map_name ? map_name : "Unknown"
|
||||
|
||||
return list2params(s)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user