mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-21 12:17:40 +01:00
Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into dev
Conflicts: baystation12.int
This commit is contained in:
@@ -70,6 +70,8 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/man_up,
|
||||
/client/proc/global_man_up,
|
||||
/client/proc/response_team, // Response Teams admin verb
|
||||
/client/proc/toggle_antagHUD_use,
|
||||
/client/proc/toggle_antagHUD_restrictions,
|
||||
/client/proc/allow_character_respawn /* Allows a ghost to respawn */
|
||||
)
|
||||
var/list/admin_verbs_ban = list(
|
||||
|
||||
@@ -515,7 +515,7 @@
|
||||
//Non-Human (Green)
|
||||
counter = 0
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr bgcolor='ccffcc'><th colspan='[length(nonhuman_positions)]'><a href='?src=\ref[src];jobban3=nonhumandept;jobban4=\ref[M]'>Non-human Positions</a></th></tr><tr align='center'>"
|
||||
jobs += "<tr bgcolor='ccffcc'><th colspan='[length(nonhuman_positions)+1]'><a href='?src=\ref[src];jobban3=nonhumandept;jobban4=\ref[M]'>Non-human Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in nonhuman_positions)
|
||||
if(!jobPos) continue
|
||||
var/datum/job/job = job_master.GetJob(jobPos)
|
||||
@@ -533,11 +533,15 @@
|
||||
counter = 0
|
||||
|
||||
//pAI isn't technically a job, but it goes in here.
|
||||
|
||||
if(jobban_isbanned(M, "pAI"))
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=pAI;jobban4=\ref[M]'><font color=red>pAI</font></a></td>"
|
||||
else
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=pAI;jobban4=\ref[M]'>pAI</a></td>"
|
||||
|
||||
if(jobban_isbanned(M, "AntagHUD"))
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=AntagHUD;jobban4=\ref[M]'><font color=red>AntagHUD</font></a></td>"
|
||||
else
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=AntagHUD;jobban4=\ref[M]'>AntagHUD</a></td>"
|
||||
jobs += "</tr></table>"
|
||||
|
||||
//Antagonist (Orange)
|
||||
@@ -2603,4 +2607,4 @@
|
||||
show_player_info(ckey)
|
||||
if("list")
|
||||
PlayerNotesPage(text2num(href_list["index"]))
|
||||
return
|
||||
return
|
||||
|
||||
@@ -226,42 +226,120 @@ Allow admins to set players to be able to respawn/bypass 30 min wait, without th
|
||||
Ccomp's first proc.
|
||||
*/
|
||||
|
||||
/client/proc/allow_character_respawn()
|
||||
set category = "Special Verbs"
|
||||
set name = "Allow player to respawn"
|
||||
set desc = "Let's the player bypass the 30 minute wait to respawn."
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
var/any = 0
|
||||
/client/proc/get_ghosts(var/notify = 0,var/what = 2)
|
||||
// what = 1, return ghosts ass list.
|
||||
// what = 2, return mob list
|
||||
|
||||
var/list/mobs = list()
|
||||
var/list/ghosts = list()
|
||||
var/list/sortmob = sortAtom(mob_list) // get the mob list.
|
||||
for(var/mob/dead/observer/M in sortmob)
|
||||
mobs.Add(M) //filter it where it's only ghosts
|
||||
any = 1 //if no ghosts show up, any will just be 0
|
||||
var/list/sortmob = sortAtom(mob_list) // get the mob list.
|
||||
/var/any=0
|
||||
for(var/mob/dead/observer/M in sortmob)
|
||||
mobs.Add(M) //filter it where it's only ghosts
|
||||
any = 1 //if no ghosts show up, any will just be 0
|
||||
if(!any)
|
||||
src << "There doesn't appear to be any ghosts for you to select."
|
||||
if(notify)
|
||||
src << "There doesn't appear to be any ghosts for you to select."
|
||||
return
|
||||
|
||||
for(var/mob/M in mobs)
|
||||
var/name = M.name
|
||||
ghosts[name] = M //get the name of the mob for the popup list
|
||||
ghosts[name] = M //get the name of the mob for the popup list
|
||||
if(what==1)
|
||||
return ghosts
|
||||
else
|
||||
return mobs
|
||||
|
||||
|
||||
/client/proc/allow_character_respawn()
|
||||
set category = "Special Verbs"
|
||||
set name = "Allow player to respawn"
|
||||
set desc = "Let's the player bypass the 30 minute wait to respawn or allow them to re-enter their corpse."
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
var/list/ghosts= get_ghosts(1,1)
|
||||
|
||||
var/target = input("Please, select a ghost!", "COME BACK TO LIFE!", null, null) as null|anything in ghosts
|
||||
if(!target)
|
||||
src << "Hrm, appears you didn't select a ghost" // Sanity check, if no ghosts in the list we don't want to edit a null variable and cause a runtime error.
|
||||
return
|
||||
|
||||
var/mob/M = ghosts[target]
|
||||
M.timeofdeath=-19999 /* time of death is checked in /mob/verb/abandon_mob() which is the Respawn verb.
|
||||
var/mob/dead/observer/G = ghosts[target]
|
||||
if(G.has_enabled_antagHUD && config.antag_hud_restricted)
|
||||
var/response = alert(src, "Are you sure you wish to allow this individual to play?","Ghost has used AntagHUD","Yes","No")
|
||||
if(response == "No") return
|
||||
G.timeofdeath=-19999 /* time of death is checked in /mob/verb/abandon_mob() which is the Respawn verb.
|
||||
timeofdeath is used for bodies on autopsy but since we're messing with a ghost I'm pretty sure
|
||||
there won't be an autopsy.
|
||||
*/
|
||||
M:show_message(text("\blue <B>You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead.</B>"), 1)
|
||||
log_admin("[key_name(usr)] allowed [key_name(M)] to bypass the 30 minute respawn limit")
|
||||
message_admins("Admin [key_name_admin(usr)] allowed [key_name_admin(M)] to bypass the 30 minute respawn limit", 1)
|
||||
G.has_enabled_antagHUD = 2
|
||||
G.can_reenter_corpse = 1
|
||||
|
||||
G:show_message(text("\blue <B>You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead.</B>"), 1)
|
||||
log_admin("[key_name(usr)] allowed [key_name(G)] to bypass the 30 minute respawn limit")
|
||||
message_admins("Admin [key_name_admin(usr)] allowed [key_name_admin(G)] to bypass the 30 minute respawn limit", 1)
|
||||
|
||||
|
||||
/client/proc/toggle_antagHUD_use()
|
||||
set category = "Server"
|
||||
set name = "Toggle antagHUD usage"
|
||||
set desc = "Toggles antagHUD usage for observers"
|
||||
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
var/action=""
|
||||
if(config.antag_hud_allowed)
|
||||
for(var/mob/dead/observer/g in get_ghosts())
|
||||
if(!g.client.holder) //Remove the verb from non-admin ghosts
|
||||
g.verbs -= /mob/dead/observer/verb/toggle_antagHUD
|
||||
if(g.antagHUD)
|
||||
g.antagHUD = 0 // Disable it on those that have it enabled
|
||||
g.has_enabled_antagHUD = 2 // We'll allow them to respawn
|
||||
g << "\red <B>The Administrator has disabled AntagHUD </B>"
|
||||
config.antag_hud_allowed = 0
|
||||
src << "\red <B>AntagHUD usage has been disabled</B>"
|
||||
action = "disabled"
|
||||
else
|
||||
for(var/mob/dead/observer/g in get_ghosts())
|
||||
if(!g.client.holder) // Add the verb back for all non-admin ghosts
|
||||
g.verbs += /mob/dead/observer/verb/toggle_antagHUD
|
||||
g << "\blue <B>The Administrator has enabled AntagHUD </B>" // Notify all observers they can now use AntagHUD
|
||||
config.antag_hud_allowed = 1
|
||||
action = "enabled"
|
||||
src << "\blue <B>AntagHUD usage has been enabled</B>"
|
||||
|
||||
|
||||
log_admin("[key_name(usr)] has [action] antagHUD usage for observers")
|
||||
message_admins("Admin [key_name_admin(usr)] has [action] antagHUD usage for observers", 1)
|
||||
|
||||
|
||||
|
||||
/client/proc/toggle_antagHUD_restrictions()
|
||||
set category = "Server"
|
||||
set name = "Toggle antagHUD Restrictions"
|
||||
set desc = "Restricts players that have used antagHUD from being able to join this round."
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
var/action=""
|
||||
if(config.antag_hud_restricted)
|
||||
for(var/mob/dead/observer/g in get_ghosts())
|
||||
g << "\blue <B>The administrator has lifted restrictions on joining the round if you use AntagHUD</B>"
|
||||
action = "lifted restrictions"
|
||||
config.antag_hud_restricted = 0
|
||||
src << "\blue <B>AntagHUD restrictions have been lifted</B>"
|
||||
else
|
||||
for(var/mob/dead/observer/g in get_ghosts())
|
||||
g << "\red <B>The administrator has placed restrictions on joining the round if you use AntagHUD</B>"
|
||||
g << "\red <B>Your AntagHUD has been disabled, you may choose to re-enabled it but will be under restrictions </B>"
|
||||
g.antagHUD = 0
|
||||
g.has_enabled_antagHUD = 0
|
||||
action = "placed restrictions"
|
||||
config.antag_hud_restricted = 1
|
||||
src << "\red <B>AntagHUD restrictions have been enabled</B>"
|
||||
|
||||
log_admin("[key_name(usr)] has [action] on joining the round if they use AntagHUD")
|
||||
message_admins("Admin [key_name_admin(usr)] has [action] on joining the round if they use AntagHUD", 1)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user