mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge pull request #3940 from Ccomp5950/ghost_buff
AntagHUD's player verbs will now disappear from the players view if disabled by admin or by configuration options.
This commit is contained in:
@@ -290,15 +290,19 @@ Ccomp's first proc.
|
||||
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.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"
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
see_in_dark = 100
|
||||
verbs += /mob/dead/observer/proc/dead_tele
|
||||
|
||||
stat = DEAD
|
||||
|
||||
var/turf/T
|
||||
@@ -149,6 +150,8 @@ Works together with spawning an observer, noted above.
|
||||
ghost.can_reenter_corpse = can_reenter_corpse
|
||||
ghost.timeofdeath = src.timeofdeath //BS12 EDIT
|
||||
ghost.key = key
|
||||
if(!ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
|
||||
ghost.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
|
||||
return ghost
|
||||
|
||||
/*
|
||||
|
||||
@@ -114,6 +114,7 @@
|
||||
spawning = 1
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo
|
||||
|
||||
|
||||
observer.started_as_observer = 1
|
||||
close_spawn_windows()
|
||||
var/obj/O = locate("landmark*Observer-Start")
|
||||
@@ -129,8 +130,11 @@
|
||||
client.prefs.real_name = random_name(client.prefs.gender)
|
||||
observer.real_name = client.prefs.real_name
|
||||
observer.name = observer.real_name
|
||||
if(!client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
|
||||
observer.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
|
||||
observer.key = key
|
||||
del(src)
|
||||
|
||||
return 1
|
||||
|
||||
if(href_list["late_join"])
|
||||
|
||||
Reference in New Issue
Block a user