mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-20 18:47:20 +01:00
Adminwho topic tweak + Graphics fix verb (#19246)
This commit is contained in:
@@ -1230,6 +1230,13 @@
|
||||
src << link(GLOB.configuration.system.region_map[choice])
|
||||
|
||||
|
||||
/client/verb/reload_graphics()
|
||||
set category = "Special Verbs"
|
||||
set name = "Reload Graphics"
|
||||
|
||||
winset(src, null, "command=\".configure graphics-hwmode off\"")
|
||||
winset(src, null, "command=\".configure graphics-hwmode on\"")
|
||||
|
||||
#undef LIMITER_SIZE
|
||||
#undef CURRENT_SECOND
|
||||
#undef SECOND_COUNT
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/datum/world_topic_handler/adminwho
|
||||
topic_key = "adminwho"
|
||||
requires_commskey = TRUE
|
||||
|
||||
/datum/world_topic_handler/adminwho/execute(list/input, key_valid)
|
||||
var/list/out_data = list()
|
||||
|
||||
for(var/client/C in GLOB.admins)
|
||||
var/list/this_entry = list()
|
||||
// Send both incase we want special formatting
|
||||
this_entry["ckey"] = C.ckey
|
||||
this_entry["key"] = C.key
|
||||
this_entry["rank"] = C.holder.rank
|
||||
// is_afk() returns an int of inactivity, we can use this to determine AFK for how long
|
||||
// This info will not be shown in public channels
|
||||
this_entry["afk"] = C.is_afk()
|
||||
this_entry["stealth"] = "NONE"
|
||||
this_entry["skey"] = "NONE"
|
||||
if(C.holder.fakekey)
|
||||
this_entry["stealth"] = "STEALTH"
|
||||
this_entry["skey"] = C.holder.fakekey
|
||||
|
||||
if(C.holder.big_brother)
|
||||
// While this may seem counter intuitive, only the host has the commskey, and this info wont be broadcasted to chats
|
||||
this_entry["stealth"] = "BB"
|
||||
this_entry["skey"] = C.holder.fakekey
|
||||
|
||||
out_data += list(this_entry)
|
||||
|
||||
return json_encode(out_data)
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
/datum/world_topic_handler/status/execute(list/input, key_valid)
|
||||
var/list/status_info = list()
|
||||
var/list/admins = list()
|
||||
status_info["version"] = GLOB.revision_info.commit_hash
|
||||
status_info["mode"] = GLOB.master_mode
|
||||
status_info["respawn"] = GLOB.configuration.general.respawn_enabled
|
||||
@@ -25,7 +24,6 @@
|
||||
if(C.holder.fakekey)
|
||||
continue //so stealthmins aren't revealed by the hub
|
||||
admin_count++
|
||||
admins += list(list(C.key, C.holder.rank))
|
||||
player_count++
|
||||
status_info["players"] = player_count
|
||||
status_info["admins"] = admin_count
|
||||
@@ -34,20 +32,15 @@
|
||||
|
||||
// Add more info if we are authed
|
||||
if(key_valid)
|
||||
if(SSticker && SSticker.mode)
|
||||
if(SSticker.mode)
|
||||
status_info["real_mode"] = SSticker.mode.name
|
||||
status_info["security_level"] = get_security_level()
|
||||
status_info["ticker_state"] = SSticker.current_state
|
||||
|
||||
if(SSshuttle && SSshuttle.emergency)
|
||||
if(SSshuttle.emergency)
|
||||
// Shuttle status, see /__DEFINES/stat.dm
|
||||
status_info["shuttle_mode"] = SSshuttle.emergency.mode
|
||||
// Shuttle timer, in seconds
|
||||
status_info["shuttle_timer"] = SSshuttle.emergency.timeLeft()
|
||||
|
||||
for(var/i in 1 to admins.len)
|
||||
var/list/A = admins[i]
|
||||
status_info["admin[i - 1]"] = A[1]
|
||||
status_info["adminrank[i - 1]"] = A[2]
|
||||
|
||||
return json_encode(status_info)
|
||||
|
||||
Reference in New Issue
Block a user