mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 03:25:49 +01:00
incorporates code comments
This commit is contained in:
@@ -624,16 +624,18 @@ GLOBAL_LIST_INIT(do_after_once_tracker, list())
|
||||
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
|
||||
/** 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)
|
||||
for(var/p in GLOB.human_list) //contains only human mobs, so no type check needed
|
||||
var/mob/living/carbon/human/player = p //need to tell it what type it is or we can't access stat without the dreaded :
|
||||
if(determine_role(player) in sec_positions)
|
||||
total++
|
||||
if(player.stat == DEAD)
|
||||
|
||||
Reference in New Issue
Block a user