Skip to content

Commit

Permalink
Ретёрн и лишний иф моб
Browse files Browse the repository at this point in the history
  • Loading branch information
FlitchTime committed Dec 22, 2024
1 parent 7322a9d commit 2537581
Showing 1 changed file with 19 additions and 26 deletions.
45 changes: 19 additions & 26 deletions code/modules/admin/player_panel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -662,31 +662,29 @@
/datum/admins/proc/check_security()
if(!check_rights(R_ADMIN))
return
if!(SSticker && SSticker.current_state >= GAME_STATE_PLAYING)

Check failure on line 665 in code/modules/admin/player_panel.dm

View workflow job for this annotation

GitHub Actions / Run Linters

got '!', expected one of: '('
return

if(SSticker && SSticker.current_state >= GAME_STATE_PLAYING)
var/dat = {"<html><meta charset="UTF-8"><head><title>Round Status</title></head><body><h1><B>Round Status</B></h1>"}
var/list/sec_list = check_active_security_force()
dat += "<br><table cellspacing=5><tr><td><b>Security</b></td><td></td></tr>"
dat += "<tr><td>Total: </td><td>[sec_list[1]]</td>"
dat += "<tr><td>Active: </td><td>[sec_list[2]]</td>"
dat += "<tr><td>Dead: </td><td>[sec_list[3]]</td>"
dat += "<tr><td>Antag: </td><td>[sec_list[4]]</td>"
dat += "</table>"
dat += "</body></html>"

dat += "<br><table cellspacing=5><tr><td><B>Security</B></td><td></td></tr>"
for(var/datum/mind/mind in SSticker.mode.get_all_sec())
if(mind.current)
dat += check_security_line(mind.current)
dat += "</table>"
var/dat = {"<html><meta charset="UTF-8"><head><title>Round Status</title></head><body><h1><B>Round Status</B></h1>"}
var/list/sec_list = check_active_security_force()
dat += "<br><table cellspacing=5><tr><td><b>Security</b></td><td></td></tr>"
dat += "<tr><td>Total: </td><td>[sec_list[1]]</td>"
dat += "<tr><td>Active: </td><td>[sec_list[2]]</td>"
dat += "<tr><td>Dead: </td><td>[sec_list[3]]</td>"
dat += "<tr><td>Antag: </td><td>[sec_list[4]]</td>"
dat += "</table>"
dat += "</body></html>"

if(SSticker.mode.ert.len)
dat += check_role_table_sec("ERT", SSticker.mode.ert)
dat += "<br><table cellspacing=5><tr><td><B>Security</B></td><td></td></tr>"
for(var/datum/mind/mind in SSticker.mode.get_all_sec())
if(mind.current)
dat += check_security_line(mind.current)
dat += "</table>"

usr << browse(dat, "window=roundstatus;size=600x800")
if(SSticker.mode.ert.len)
dat += check_role_table_sec("ERT", SSticker.mode.ert)

else
alert("The game hasn't started yet!")
usr << browse(dat, "window=roundstatus;size=600x800")

/datum/admins/proc/check_role_table_sec(name, list/members, show_objectives=0)
var/txt = "<br><table cellspacing=5><tr><td><b>[name]</b></td><td></td></tr>"
Expand All @@ -696,17 +694,12 @@
return txt

/datum/admins/proc/check_role_table_row_sec(mob/mob, show_objectives)
if(!istype(mob))
return "<tr><td><i>Not found!</i></td></tr>"

var/txt = check_security_line(mob, close = 0)

if(show_objectives)
txt += {"
<td>
<a href='byond://?src=[UID()];traitor=[mob.UID()]'>Show Objective</a>
</td>
"}

txt += "</tr>"
return txt

0 comments on commit 2537581

Please sign in to comment.