mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 17:52:36 +00:00
Mob ckey sanity check now respects insano aghost code (#91517)
## About The Pull Request I HATE THIS PLACE DUDE, aghosting sets your ckey/key to your normal ckey/ckey but with @ prefixed. hhhhhhhhh.
This commit is contained in:
@@ -10,3 +10,6 @@
|
||||
/// The maximum client BYOND build to disable screentip icons for.
|
||||
/// Update this whenever https://www.byond.com/forum/post/2967731 is fixed.
|
||||
#define MAX_BYOND_BUILD_DISABLE_SCREENTIP_ICONS 1699
|
||||
|
||||
/// Aghosting AND APPERANTLY STEALTHMINNING sets your ckey/key == "@[old_key]" because it hates me. this detects that
|
||||
#define IS_FAKE_KEY(key) (key && key[1] == "@")
|
||||
|
||||
@@ -741,7 +741,7 @@ ADMIN_VERB(cmd_admin_pm_panel, R_NONE, "Admin PM", "Show a list of clients to PM
|
||||
return null
|
||||
|
||||
var/searching_ckey = whom
|
||||
if(whom[1] == "@")
|
||||
if(IS_FAKE_KEY(whom))
|
||||
searching_ckey = findTrueKey(whom)
|
||||
|
||||
if(searching_ckey == EXTERNAL_PM_USER)
|
||||
|
||||
@@ -259,7 +259,7 @@ Works together with spawning an observer, noted above.
|
||||
/mob/proc/ghostize(can_reenter_corpse = TRUE, admin_ghost = FALSE)
|
||||
if(!key)
|
||||
return
|
||||
if(key[1] == "@") // Skip aghosts.
|
||||
if(IS_FAKE_KEY(key)) // Skip aghosts.
|
||||
return
|
||||
|
||||
if(HAS_TRAIT(src, TRAIT_CORPSELOCKED) && !admin_ghost)
|
||||
@@ -375,7 +375,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(!can_reenter_corpse && !mind.has_antag_datum(/datum/antagonist/changeling)) //SKYRAT EDIT
|
||||
to_chat(src, span_warning("You cannot re-enter your body."))
|
||||
return
|
||||
if(mind.current.key && mind.current.key[1] != "@") //makes sure we don't accidentally kick any clients
|
||||
if(mind.current.key && !IS_FAKE_KEY(mind.current.key)) //makes sure we don't accidentally kick any clients
|
||||
to_chat(usr, span_warning("Another consciousness is in your body...It is resisting you."))
|
||||
return
|
||||
client.view_size.setDefault(getScreenSize(client.prefs.read_preference(/datum/preference/toggle/widescreen)))//Let's reset so people can't become allseeing gods
|
||||
|
||||
@@ -898,7 +898,7 @@
|
||||
if (current_brain.suicided || (current_brain.brainmob && HAS_TRAIT(current_brain.brainmob, TRAIT_SUICIDED)))
|
||||
return DEFIB_FAIL_NO_INTELLIGENCE
|
||||
|
||||
if(key && key[1] == "@") // Adminghosts
|
||||
if(IS_FAKE_KEY(key))
|
||||
return DEFIB_NOGRAB_AGHOST
|
||||
|
||||
return DEFIB_POSSIBLE
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/mob/Destroy()
|
||||
if(client)
|
||||
stack_trace("Mob with client has been deleted.")
|
||||
else if(ckey)
|
||||
else if(ckey && !IS_FAKE_KEY(ckey)) // FUCK YOU AGHOST CODE FUCK YOU
|
||||
stack_trace("Mob without client but with associated ckey, [ckey], has been deleted.")
|
||||
|
||||
persistent_client?.set_mob(null)
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
|| mind_to_swap.has_antag_datum(/datum/antagonist/cult) \
|
||||
|| mind_to_swap.has_antag_datum(/datum/antagonist/changeling) \
|
||||
|| mind_to_swap.has_antag_datum(/datum/antagonist/rev) \
|
||||
|| mind_to_swap.key?[1] == "@" \
|
||||
|| IS_FAKE_KEY(mind_to_swap.key) \
|
||||
)
|
||||
to_chat(caster, span_warning("[to_swap.p_Their()] mind is resisting your spell!"))
|
||||
return FALSE
|
||||
|
||||
Reference in New Issue
Block a user