Skip to content

Commit

Permalink
Fix constant runtimes/breakage with symptom varients
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy committed Sep 18, 2024
1 parent 652d8b1 commit 6df95b7
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@
setup_varient()
host_symptom.update_name()

/datum/symptom_varient/proc/set_disease_parent(datum/disease/attached)
/datum/symptom_varient/Destroy(force)
if(host_symptom)
UnregisterSignal(host_symptom, list(COMSIG_SYMPTOM_ATTACH, COMSIG_SYMPTOM_DETACH, COMSIG_SYMPTOM_TRIGGER))
host_symptom = null
host_disease = null
return ..()

/datum/symptom_varient/proc/set_disease_parent(datum/source, datum/disease/attached)
SIGNAL_HANDLER

UnregisterSignal(host_symptom, COMSIG_SYMPTOM_ATTACH)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ GLOBAL_LIST_INIT(bluespace_varient_list, list())
bluespace_id = last_bluespace_id

/datum/symptom_varient/bluespace/Destroy(force)
. = ..()
GLOB.bluespace_varient_list -= src
return ..()

/datum/symptom_varient/bluespace/setup_varient()
. = ..()
RegisterSignal(host_symptom, COMSIG_SYMPTOM_TRIGGER, PROC_REF(propagate))


/datum/symptom_varient/bluespace/proc/propagate()
for(var/datum/symptom_varient/bluespace/bluespace as anything in GLOB.bluespace_varient_list)
if(bluespace_id != bluespace.bluespace_id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
cooldown_time = 15 SECONDS

/datum/symptom_varient/recursive/Destroy(force)
. = ..()
UnregisterSignal(host_symptom, COMSIG_SYMPTOM_TRIGGER)
return ..()

/datum/symptom_varient/recursive/set_disease_parent(datum/disease/attached)
/datum/symptom_varient/recursive/set_disease_parent(datum/source, datum/disease/attached)
. = ..()
RegisterSignal(host_symptom, COMSIG_SYMPTOM_TRIGGER, PROC_REF(start_chain))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
var/mob/living/host_mob

/datum/symptom_varient/reflexive/Destroy(force)
. = ..()
if(host_mob)
UnregisterSignal(host_mob, COMSIG_CARBON_TAKE_BRUTE_DAMAGE)
host_mob = null
return ..()

/datum/symptom_varient/reflexive/set_disease_parent(datum/disease/attached)
/datum/symptom_varient/reflexive/set_disease_parent(datum/source, datum/disease/attached)
. = ..()
if(attached.return_parent())
host_mob = attached.return_parent()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
. = ..()
STOP_PROCESSING(SSobj, src)

/datum/symptom_varient/routine/set_disease_parent(datum/disease/attached)
/datum/symptom_varient/routine/set_disease_parent(datum/source, datum/disease/attached)
. = ..()
START_PROCESSING(SSobj, src)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
. = ..()
UnregisterSignal(host_symptom, COMSIG_SYMPTOM_TRIGGER)

/datum/symptom_varient/strength/set_disease_parent(datum/disease/attached)
/datum/symptom_varient/strength/set_disease_parent(datum/source, datum/disease/attached)
. = ..()
RegisterSignal(host_symptom, COMSIG_SYMPTOM_TRIGGER, PROC_REF(increase_strength))

Expand Down

0 comments on commit 6df95b7

Please sign in to comment.