Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ToD not getting updated if ghostized without a client #6412

Merged
merged 2 commits into from
Jun 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions code/modules/mob/dead/observer/observer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,12 @@ Works together with spawning an observer, noted above.

mind = null

// Larva queue: We use the larger of their existing queue time or the new timeofdeath except for facehuggers or lesser drone
var/new_tod = (isfacehugger(src) || islesserdrone(src)) ? 1 : ghost.timeofdeath

// if they died as facehugger or lesser drone, bypass typical TOD checks
ghost.bypass_time_of_death_checks = (isfacehugger(src) || islesserdrone(src))

if(ghost.client)
ghost.client.init_verbs()
ghost.client.change_view(GLOB.world_view_size) //reset view range to default
Expand All @@ -485,13 +491,12 @@ Works together with spawning an observer, noted above.
if(ghost.client.player_data)
ghost.client.player_data.load_timestat_data()

// Larva queue: We use the larger of their existing queue time or the new timeofdeath except for facehuggers or lesser drone
var/new_tod = (isfacehugger(src) || islesserdrone(src)) ? 1 : ghost.timeofdeath

// if they died as facehugger or lesser drone, bypass typical TOD checks
ghost.bypass_time_of_death_checks = (isfacehugger(src) || islesserdrone(src))
ghost.client.player_details.larva_queue_time = max(ghost.client.player_details.larva_queue_time, new_tod)

ghost.client?.player_details.larva_queue_time = max(ghost.client.player_details.larva_queue_time, new_tod)
else if(persistent_ckey)
var/datum/player_details/details = GLOB.player_details[persistent_ckey]
if(details)
details.larva_queue_time = max(details.larva_queue_time, new_tod)

ghost.set_huds_from_prefs()

Expand Down
Loading