Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Ports a couple of of misc fixes #2218

Merged
merged 1 commit into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading