Skip to content

Commit

Permalink
Pathology fixes (#4439)
Browse files Browse the repository at this point in the history
* annoying pathology fixes

* this should return true

* Clean up and fix bluespace varient code

* maybe that'll fix that?

* WHOOPS
  • Loading branch information
Absolucy authored Dec 7, 2024
1 parent 790928b commit e64939a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
return FALSE
host_symptom.run_effect(host_disease.affected_mob, host_disease)
COOLDOWN_START(src, host_cooldown, cooldown_time)
return TRUE

/datum/symptom_varient/proc/Copy(datum/symptom/new_symp)
return new type(new_symp)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GLOBAL_LIST_INIT(bluespace_varient_list, list())
GLOBAL_LIST_EMPTY_TYPED(bluespace_varient_list, /datum/symptom_varient/bluespace)

/datum/symptom_varient/bluespace
name = "Quantumly Entangled"
Expand All @@ -10,11 +10,12 @@ GLOBAL_LIST_INIT(bluespace_varient_list, list())
var/bluespace_id = 0
var/static/last_bluespace_id = 0

/datum/symptom_varient/bluespace/New(datum/symptom/host)
/datum/symptom_varient/bluespace/New(datum/symptom/host, bluespace_id)
. = ..()
GLOB.bluespace_varient_list += src
last_bluespace_id++
bluespace_id = last_bluespace_id
if(isnull(bluespace_id))
bluespace_id = last_bluespace_id++
src.bluespace_id = bluespace_id

/datum/symptom_varient/bluespace/Destroy(force)
GLOB.bluespace_varient_list -= src
Expand All @@ -24,15 +25,11 @@ GLOBAL_LIST_INIT(bluespace_varient_list, list())
. = ..()
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)
continue
COOLDOWN_START(bluespace, host_cooldown, cooldown_time)
/datum/symptom_varient/bluespace/Copy(datum/symptom/new_symp)
return new /datum/symptom_varient/bluespace(new_symp, bluespace_id)

/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)
continue
if(!bluespace.host_disease)
if(QDELETED(bluespace) || bluespace_id != bluespace.bluespace_id)
continue
bluespace.host_symptom.run_effect(bluespace.host_disease.return_parent(), bluespace.host_disease)
bluespace.trigger_symptom()
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
UnregisterSignal(host_symptom, COMSIG_SYMPTOM_TRIGGER)

/datum/symptom_varient/recursive/proc/start_chain()
trigger_symptom()

addtimer(CALLBACK(src, PROC_REF(trigger)), 2 SECONDS)
addtimer(CALLBACK(src, PROC_REF(trigger)), 4 SECONDS)
if(trigger_symptom())
addtimer(CALLBACK(src, PROC_REF(trigger)), 2 SECONDS, TIMER_DELETE_ME)
addtimer(CALLBACK(src, PROC_REF(trigger)), 4 SECONDS, TIMER_DELETE_ME)

/datum/symptom_varient/recursive/proc/trigger()
host_symptom.run_effect(host_disease.affected_mob, host_disease)
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
var/datum/symptom_varient/attached_varient
// This is our attached varient used for updating desc and Symptom copy code.

/datum/symptom/Destroy(force)
QDEL_NULL(attached_varient)
return ..()

/datum/symptom/proc/minormutate()
if (prob(20))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@

/datum/symptom/plasma_heal/first_activate(mob/living/carbon/mob, datum/disease/advanced/disease)
. = ..()
if(!HAS_TRAIT(mob, TRAIT_PLASMA_LOVER_METABOLISM))
to_chat(mob, span_notice("You suddenly love plasma."))
ADD_TRAIT(mob, TRAIT_PLASMA_LOVER_METABOLISM, type)
to_chat(mob, span_notice("You suddenly love plasma."))

/datum/symptom/plasma_heal/side_effect(mob/living/mob)
. = ..()
Expand Down

0 comments on commit e64939a

Please sign in to comment.