mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
Added security counter to check antags panel
This commit is contained in:
@@ -616,3 +616,32 @@ GLOBAL_LIST_INIT(do_after_once_tracker, list())
|
||||
chosen = pick(mob_spawn_meancritters)
|
||||
var/mob/living/simple_animal/C = new chosen(spawn_location)
|
||||
return C
|
||||
|
||||
//determines the job of a mob, taking into account job transfers
|
||||
/proc/determine_role(mob/living/P)
|
||||
var/datum/mind/M = P.mind
|
||||
if(!M)
|
||||
return
|
||||
return M.playtime_role ? M.playtime_role : M.assigned_role //returns current role
|
||||
|
||||
//checks the security force on station and returns a list of numbers, of the form:
|
||||
// total, active, dead, antag
|
||||
// where active is defined as conscious (STAT = 0) and not an antag
|
||||
/proc/check_active_security_force()
|
||||
var/sec_positions = GLOB.security_positions - "Magistrate" - "Brig Physician"
|
||||
var/total = 0
|
||||
var/active = 0
|
||||
var/dead = 0
|
||||
var/antag = 0
|
||||
for(var/mob/living/carbon/human/player in GLOB.human_list)
|
||||
if(determine_role(player) in sec_positions)
|
||||
total++
|
||||
if(player.stat == DEAD)
|
||||
dead++
|
||||
continue
|
||||
if(isAntag(player))
|
||||
antag++
|
||||
continue
|
||||
if(player.stat == CONSCIOUS)
|
||||
active++
|
||||
return list(total, active, dead, antag)
|
||||
|
||||
@@ -404,7 +404,8 @@
|
||||
<td><A href='?src=[usr.UID()];priv_msg=[M.client ? M.client.UID() : null]'>PM</A> [ADMIN_FLW(M, "FLW")] </td>[close ? "</tr>" : ""]"}
|
||||
|
||||
/datum/admins/proc/check_antagonists()
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
if(SSticker && SSticker.current_state >= GAME_STATE_PLAYING)
|
||||
var/dat = "<html><head><title>Round Status</title></head><body><h1><B>Round Status</B></h1>"
|
||||
dat += "Current Game Mode: <B>[SSticker.mode.name]</B><BR>"
|
||||
@@ -570,6 +571,10 @@
|
||||
if(SSticker.mode.ert.len)
|
||||
dat += check_role_table("ERT", SSticker.mode.ert)
|
||||
|
||||
//list active security force count, so admins know how bad things are
|
||||
var/list/sec_list = check_active_security_force()
|
||||
dat += "<table cellspacing=5><TR><TD>Security Force Overview(total/active/dead/antag): [sec_list[1]]/[sec_list[2]]/[sec_list[3]]/[sec_list[4]]</TD></TR></TABLE>"
|
||||
|
||||
dat += "</body></html>"
|
||||
usr << browse(dat, "window=roundstatus;size=400x500")
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user