Skip to content

Commit

Permalink
Ports a couple of of misc fixes (#2218)
Browse files Browse the repository at this point in the history
* Ports some borer fixes

* Update cortical_borer_abilities.dm

* Prosperity prism healing is now forced, because magic

* It should really be happening when the organ is inserted/removed (or deleted)

* Whoops, missed these

* And these

* Update modular_nova/modules/cortical_borer/code/cortical_borer_abilities.dm

Co-authored-by: Bloop <[email protected]>
  • Loading branch information
Steals-The-PRs and vinylspiders authored Mar 2, 2024
1 parent f051510 commit 1303bd0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
continue

if(use_power(POWER_PER_USE))
possible_cultist.adjustToxLoss(-2.5 * seconds_per_tick)
possible_cultist.adjustStaminaLoss(-7.5 * seconds_per_tick)
possible_cultist.adjustBruteLoss(-2.5 * seconds_per_tick)
possible_cultist.adjustFireLoss(-2.5 * seconds_per_tick)
possible_cultist.adjustOxyLoss(-2.5 * seconds_per_tick)
possible_cultist.adjustToxLoss(-2.5 * seconds_per_tick, forced = TRUE)
possible_cultist.adjustStaminaLoss(-7.5 * seconds_per_tick, forced = TRUE)
possible_cultist.adjustBruteLoss(-2.5 * seconds_per_tick, forced = TRUE)
possible_cultist.adjustFireLoss(-2.5 * seconds_per_tick, forced = TRUE)
possible_cultist.adjustOxyLoss(-2.5 * seconds_per_tick, forced = TRUE)

new /obj/effect/temp_visual/heal(get_turf(possible_cultist), "#45dd8a")

Expand Down
15 changes: 13 additions & 2 deletions modular_nova/modules/cortical_borer/code/cortical_borer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,16 @@ GLOBAL_LIST_EMPTY(cortical_borers)

/obj/item/organ/internal/borer_body/Destroy()
borer = null
if(owner && HAS_TRAIT_FROM(owner, TRAIT_WEATHER_IMMUNE, "borer_in_host"))
REMOVE_TRAIT(owner, TRAIT_WEATHER_IMMUNE, "borer_in_host")
return ..()

/obj/item/organ/internal/borer_body/Insert(mob/living/carbon/carbon_target, special, movement_flags)
. = ..()
for(var/datum/borer_focus/body_focus as anything in borer.body_focuses)
body_focus.on_add()
carbon_target.apply_status_effect(/datum/status_effect/grouped/screwy_hud/fake_healthy, type)
ADD_TRAIT(carbon_target, TRAIT_WEATHER_IMMUNE, "borer_in_host")

//on removal, force the borer out
/obj/item/organ/internal/borer_body/Remove(mob/living/carbon/carbon_target, special)
Expand All @@ -65,6 +68,7 @@ GLOBAL_LIST_EMPTY(cortical_borers)
if(cb_inside)
cb_inside.leave_host()
carbon_target.remove_status_effect(/datum/status_effect/grouped/screwy_hud/fake_healthy, type)
REMOVE_TRAIT(carbon_target, TRAIT_WEATHER_IMMUNE, "borer_in_host")
qdel(src)

/obj/item/reagent_containers/borer
Expand Down Expand Up @@ -245,7 +249,13 @@ GLOBAL_LIST_EMPTY(cortical_borers)
do_evolution(/datum/borer_evolution/base)

/mob/living/basic/cortical_borer/Destroy()
human_host = null
if(human_host)
if(human_host.organs)
var/obj/item/organ/internal/borer_body/borer_organ = locate() in human_host.organs
borer_organ.Remove(human_host)
if(HAS_TRAIT_FROM(human_host, TRAIT_WEATHER_IMMUNE, "borer_in_host"))
REMOVE_TRAIT(human_host, TRAIT_WEATHER_IMMUNE, "borer_in_host")
human_host = null
GLOB.cortical_borers -= src
QDEL_NULL(reagent_holder)
return ..()
Expand All @@ -260,7 +270,8 @@ GLOBAL_LIST_EMPTY(cortical_borers)
deathgasp_once = TRUE
for(var/borers in GLOB.cortical_borers)
to_chat(borers, span_boldwarning("[src] has left the hivemind forcibly!"))
QDEL_NULL(reagent_holder)
if(gibbed)
QDEL_NULL(reagent_holder)
return ..()

//so we can add some stuff to status, making it easier to read... maybe some hud some day
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,8 @@
borer_organ.Remove(cortical_owner.human_host)
cortical_owner.forceMove(human_turfone)
cortical_owner.human_host = null
if(HAS_TRAIT_FROM(cortical_owner, TRAIT_WEATHER_IMMUNE, "borer_in_host"))
REMOVE_TRAIT(cortical_owner, TRAIT_WEATHER_IMMUNE, "borer_in_host")
StartCooldown()
return

Expand Down Expand Up @@ -572,6 +574,8 @@
var/logging_text = "[key_name(cortical_owner)] went into [key_name(cortical_owner.human_host)] at [loc_name(human_turftwo)]"
cortical_owner.log_message(logging_text, LOG_GAME)
cortical_owner.human_host.log_message(logging_text, LOG_GAME)
if(!HAS_TRAIT_FROM(cortical_owner, TRAIT_WEATHER_IMMUNE, "borer_in_host")) // if somehow we didn't get a borer organ?
ADD_TRAIT(cortical_owner, TRAIT_WEATHER_IMMUNE, "borer_in_host")
StartCooldown()

/// Checks if the target's head is bio protected, returns true if this is the case
Expand Down

0 comments on commit 1303bd0

Please sign in to comment.