admin stealth mode now works while deadminned (#6630)

this is admittedly not a usual use of stealth mode but it's nice to not
pop on/off the list when deadminned

(this is nice for event rounds since you're supposed to deadmin if in a
conflict role)
This commit is contained in:
silicons
2024-07-31 10:10:27 -04:00
committed by GitHub
parent e4e31a0356
commit edcd2e52ad
18 changed files with 62 additions and 55 deletions
+25
View File
@@ -0,0 +1,25 @@
//* This file is explicitly licensed under the MIT license. *//
//* Copyright (c) 2024 silicons *//
//* Stealthmin *//
/**
* get effective ckey for render, respecting stealth keys
*/
/client/proc/get_public_key()
return holder?.fakekey || deadmin_holder?.fakekey || key
/**
* gets effective ckey & stealth key for render
*/
/client/proc/get_revealed_key()
if(!(holder?.fakekey || deadmin_holder?.fakekey))
return key
var/fake_ckey = holder?.fakekey || deadmin_holder?.fakekey || "INVALID-KEY"
return "[fake_ckey]/([key])"
/**
* should we be under stealthmin
*/
/client/proc/is_under_stealthmin()
return !!(holder?.fakekey || deadmin_holder?.fakekey)