Ashwalkers team stores players_spawned via ckeys rather than keys now (#78688)

## About The Pull Request

So this just changes some instances of `key` to `ckey`. There is a
reason for it I swear!

So when ashwalkers get spawned their mob gets added to the
`team.players_spawned` list via their `key` var.

---

However, we have this as part of sacrifice code:

Here the `deliverykey` var is set to `fingerprintslast`, which is a
ckey.


https://github.com/tgstation/tgstation/blob/f6f6ebc276bacd33e0f88e6454783209c1b28d57/code/modules/mapfluff/ruins/objects_and_mobs/ash_walker_den.dm#L79


https://github.com/tgstation/tgstation/blob/f6f6ebc276bacd33e0f88e6454783209c1b28d57/code/modules/forensics/_forensics.dm#L218

---

That `deliverykey` is then used to remove a ckey from the list here 


https://github.com/tgstation/tgstation/blob/f6f6ebc276bacd33e0f88e6454783209c1b28d57/code/modules/mapfluff/ruins/objects_and_mobs/ash_walker_den.dm#L84

Since `deliverkey` is a `ckey`, which is not always the same thing as
the `key`, this can cause a mob to not get removed from the list
properly if the two mismatch.

```(From DM Reference on `ckey`: "The key in canonical form. To do this, it strips all punctuation and space from the key and converts to lowercase. The result is still unique for each different key. ")```

I just think it's a bit confusing to switch back and forth, and it's unclear if it causes errors or not. This could be considered a code improvement I guess? Or a fix, depending.

## Why It's Good For The Game

Less confusing, more consistent code. Less bugs. Much good.

## Changelog

Nothing anyone shall ever notice besides the coders
This commit is contained in:
Bloop
2023-10-02 10:59:25 -06:00
committed by GitHub
parent abdd8b3360
commit 13cfcdad6b
2 changed files with 6 additions and 6 deletions
@@ -227,7 +227,7 @@
return ..()
/obj/effect/mob_spawn/ghost_role/human/ash_walker/allow_spawn(mob/user, silent = FALSE)
if(!(user.key in team.players_spawned))//one per person unless you get a bonus spawn
if(!(user.ckey in team.players_spawned))//one per person unless you get a bonus spawn
return TRUE
if(!silent)
to_chat(user, span_warning("You have exhausted your usefulness to the Necropolis."))
@@ -241,7 +241,7 @@
spawned_human.mind.add_antag_datum(/datum/antagonist/ashwalker, team)
spawned_human.remove_language(/datum/language/common)
team.players_spawned += (spawned_human.key)
team.players_spawned += (spawned_human.ckey)
eggshell.egg = null
QDEL_NULL(eggshell)