Refactors Temporal Scarring, changes how it works, removes longtimer quirk (#52688)

* changes temporal scarring

* hhh why is there no ckey

* note

* oops

* fixed
This commit is contained in:
Ryll Ryll
2020-08-10 15:29:27 -04:00
committed by GitHub
parent 04c7734c31
commit b7ae6fc64d
10 changed files with 156 additions and 119 deletions

View File

@@ -402,15 +402,6 @@ SUBSYSTEM_DEF(persistence)
var/mob/living/carbon/human/original_human = ending_human.mind.original_character
if(!original_human || original_human.stat == DEAD || !original_human.all_scars || !(original_human == ending_human))
if(ending_human.client) // i was told if i don't check this every step of the way byond might decide a client ceases to exist mid proc so here we go
ending_human.client.prefs.scars_list["[ending_human.client.prefs.scars_index]"] = ""
original_human.save_persistent_scars(TRUE)
else
for(var/k in ending_human.all_wounds)
var/datum/wound/iter_wound = k
iter_wound.remove_wound() // so we can get the scars for open wounds
if(!ending_human.client)
return
ending_human.client.prefs.scars_list["[ending_human.client.prefs.scars_index]"] = ending_human.format_scars()
if(!ending_human.client)
return
ending_human.client.prefs.save_character()
original_human.save_persistent_scars()

View File

@@ -325,15 +325,20 @@ SUBSYSTEM_DEF(ticker)
else
stack_trace("[S] [S.type] found in start landmarks list, which isn't a start landmark!")
// handle persistence stuff that requires ckeys, in this case hardcore mode and temporal scarring
for(var/i in GLOB.player_list)
if(!ishuman(i))
continue
var/mob/living/carbon/human/hardcore_player = i
if(!hardcore_player.hardcore_survival_score)
var/mob/living/carbon/human/iter_human = i
iter_human.increment_scar_slot()
iter_human.load_persistent_scars()
if(!iter_human.hardcore_survival_score)
continue
if(hardcore_player.mind?.special_role)
hardcore_player.hardcore_survival_score *= 2 //Double for antags
to_chat(hardcore_player, "<span class='notice'>You will gain [round(hardcore_player.hardcore_survival_score)] hardcore random points if you survive this round!</span>")
if(iter_human.mind?.special_role)
iter_human.hardcore_survival_score *= 2 //Double for antags
to_chat(iter_human, "<span class='notice'>You will gain [round(iter_human.hardcore_survival_score)] hardcore random points if you survive this round!</span>")
//These callbacks will fire after roundstart key transfer
/datum/controller/subsystem/ticker/proc/OnRoundstart(datum/callback/cb)