Skip to content

Commit

Permalink
Fix crew records not accounting for quirks for latejoiners (tgstation…
Browse files Browse the repository at this point in the history
…#83740)

## About The Pull Request

So crew records weren't actually showing the right quirks for
latejoiners, and in at least one instance (heterochromatic eyes) even
the fingerprint was wrong. The latter seemed to be caused by a recent
fix pr making the quirk actually update your dna, for the sake of
paradox clones/changelings.
Looking into it, this seemed to be because we assign quirks to
latejoiners _after_ injecting them into the manifest:

https://github.com/tgstation/tgstation/blob/b7225d8486476fc4971ef32ed3c83fd778e7e46d/code/modules/mob/dead/new_player/new_player.dm#L218-L244
See line 219 and 244.

So we move manifest injection to be _after_ quirk assignment:
```dm
(line 242-246)
	if((job.job_flags & JOB_ASSIGN_QUIRKS) && humanc && CONFIG_GET(flag/roundstart_traits))
		SSquirks.AssignQuirks(humanc, humanc.client)

	if(humanc) // Quirks may change manifest datapoints, so inject only after assigning quirks
		GLOB.manifest.inject(humanc)
```
This fixes it.
## Why It's Good For The Game

Makes quirks actually show in the medical records for latejoiners.
Makes latejoiners with heterochromatic eyes not have the wrong
fingerprint in the security records.
_Probably_ fixes tgstation#83681.
Fixes tgstation#56469.
## Changelog
:cl:
fix: Latejoiners with heterochromatic eyes no longer have the wrong
fingerprint in the security records.
fix: Latejoiners actually have their quirks visible in the medical
records.
/:cl:
  • Loading branch information
00-Steven authored Jun 8, 2024
1 parent 2a37380 commit 1e60447
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code/modules/mob/dead/new_player/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@
humanc = character //Let's retypecast the var to be human,

if(humanc) //These procs all expect humans
GLOB.manifest.inject(humanc)
if(SSshuttle.arrivals)
SSshuttle.arrivals.QueueAnnounce(humanc, rank)
else
Expand All @@ -243,6 +242,9 @@
if((job.job_flags & JOB_ASSIGN_QUIRKS) && humanc && CONFIG_GET(flag/roundstart_traits))
SSquirks.AssignQuirks(humanc, humanc.client)

if(humanc) // Quirks may change manifest datapoints, so inject only after assigning quirks
GLOB.manifest.inject(humanc)

var/area/station/arrivals = GLOB.areas_by_type[/area/station/hallway/secondary/entry]
if(humanc && arrivals && !arrivals.power_environ) //arrivals depowered
humanc.put_in_hands(new /obj/item/crowbar/large/emergency(get_turf(humanc))) //if hands full then just drops on the floor
Expand Down

0 comments on commit 1e60447

Please sign in to comment.