Skip to content

Commit

Permalink
emergency runtime fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy committed Dec 10, 2024
1 parent 798b1f2 commit 73e00fa
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -523,27 +523,32 @@ SUBSYSTEM_DEF(ticker)

return output

/datum/controller/subsystem/ticker/proc/_transfer_character(mob/dead/new_player/player)
var/mob/living = player.transfer_character()
if(!living)
return
qdel(player)
ADD_TRAIT(living, TRAIT_NO_TRANSFORM, SS_TICKER_TRAIT)
if(living.client)
var/atom/movable/screen/splash/S = new(null, living.client, TRUE)
S.Fade(TRUE)
living.client?.init_verbs()
. = living
if(living.client && length(living.client?.active_challenges))
SSchallenges.apply_challenges(living.client)
for(var/processing_reward_bitflags in bitflags_to_reward)//you really should use department bitflags if possible
if(living.mind.assigned_role.departments_bitflags & processing_reward_bitflags)
living.client?.reward_this_person += 150
for(var/processing_reward_jobs in jobs_to_reward)//just in case you really only want to reward a specific job
if(living.job == processing_reward_jobs)
living.client?.reward_this_person += 150

/datum/controller/subsystem/ticker/proc/transfer_characters()
var/list/livings = list()
for(var/mob/dead/new_player/player as anything in GLOB.new_player_list)
var/mob/living = player.transfer_character()
if(living)
qdel(player)
ADD_TRAIT(living, TRAIT_NO_TRANSFORM, SS_TICKER_TRAIT)
if(living.client)
var/atom/movable/screen/splash/S = new(null, living.client, TRUE)
S.Fade(TRUE)
living.client.init_verbs()
livings += living
if(living.client && length(living.client?.active_challenges))
SSchallenges.apply_challenges(living.client)
for(var/processing_reward_bitflags in bitflags_to_reward)//you really should use department bitflags if possible
if(living.mind.assigned_role.departments_bitflags & processing_reward_bitflags)
living.client.reward_this_person += 150
for(var/processing_reward_jobs in jobs_to_reward)//just in case you really only want to reward a specific job
if(living.job == processing_reward_jobs)
living.client.reward_this_person += 150
if(livings.len)
livings += _transfer_character(player)
list_clear_nulls(livings)
if(length(livings))
addtimer(CALLBACK(src, PROC_REF(release_characters), livings), 3 SECONDS, TIMER_CLIENT_TIME)

/datum/controller/subsystem/ticker/proc/release_characters(list/livings)
Expand Down

0 comments on commit 73e00fa

Please sign in to comment.