mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-26 06:40:08 +01:00
Enforces antagHUD restrictions.
antagHUD checks were missing in a few places. Can no longer join as drone, ERT member, or pAI if you have enabled antagHUD.
This commit is contained in:
@@ -427,9 +427,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
src << "<span class='warning'>Spawning as a mouse is currently disabled.</span>"
|
||||
return
|
||||
|
||||
var/mob/dead/observer/M = usr
|
||||
if(config.antag_hud_restricted && M.has_enabled_antagHUD == 1)
|
||||
src << "<span class='warning'>antagHUD restrictions prevent you from spawning in as a mouse.</span>"
|
||||
if(!MayRespawn(1))
|
||||
return
|
||||
|
||||
var/timedifference = world.time - client.time_died_as_mouse
|
||||
@@ -620,3 +618,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
/mob/dead/observer/canface()
|
||||
return 1
|
||||
|
||||
mob/dead/observer/MayRespawn(var/feedback = 0)
|
||||
if(config.antag_hud_restricted && has_enabled_antagHUD == 1)
|
||||
if(feedback)
|
||||
src << "<span class='warning'>antagHUD restrictions prevent you from respawning.</span>"
|
||||
return 0
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user