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

Fire stops Xeno regen (Main - Vamp) #7135

Closed
wants to merge 1 commit into from
Closed
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 @@ -199,6 +199,8 @@
target_turfs += current_turfs
telegraph_atom_list += new /obj/effect/xenomorph/xeno_telegraph/red(current_turfs, 2)

var/can_heal = !(SEND_SIGNAL(xeno, COMSIG_XENO_PRE_HEAL) & COMPONENT_CANCEL_XENO_HEAL)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bad signal.

Signals should only be sent from one location in code. If they need to be sent from multiple locations in code, they need to be separated into their own signal.

Consider isolating this into its own can_heal proc on the xenomorph type itself and calling the signal from there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I notice this signal is sent from multiple places in code right now, but that's bad. I think you should just do this basic refactor since it'll prevent headache in the future.


for (var/turf/current_turfs in target_turfs)
for (var/mob/living/carbon/target in current_turfs)
if (target.stat == DEAD)
Expand All @@ -214,11 +216,13 @@
log_attack("[key_name(xeno)] attacked [key_name(target)] with Flurry")
target.apply_armoured_damage(get_xeno_damage_slash(target, xeno.caste.melee_damage_upper), ARMOR_MELEE, BRUTE, rand_zone())
playsound(get_turf(target), 'sound/weapons/alien_claw_flesh4.ogg', 30, TRUE)
xeno.flick_heal_overlay(1 SECONDS, "#00B800")
xeno.gain_health(30)
xeno.animation_attack_on(target)
if(can_heal)
xeno.flick_heal_overlay(1 SECONDS, "#00B800")
xeno.gain_health(30)

xeno.emote("roar")
if(can_heal)//No heals = No Roar
xeno.emote("roar")
return ..()

/datum/action/xeno_action/activable/tail_jab/use_ability(atom/targeted_atom)
Expand Down Expand Up @@ -374,10 +378,11 @@
xeno.animation_attack_on(target_carbon, pixel_offset = 16)
target_carbon.apply_armoured_damage(60, ARMOR_MELEE, BRUTE, "head", 5) //DIE
target_carbon.death(create_cause_data("headbite execution", xeno), FALSE)
xeno.gain_health(150)
xeno.xeno_jitter(1 SECONDS)
xeno.flick_heal_overlay(3 SECONDS, "#00B800")
xeno.emote("roar")
if(!(SEND_SIGNAL(xeno, COMSIG_XENO_PRE_HEAL) & COMPONENT_CANCEL_XENO_HEAL))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here

xeno.gain_health(150)
xeno.xeno_jitter(1 SECONDS)
xeno.flick_heal_overlay(3 SECONDS, "#00B800")
xeno.emote("roar")
log_attack("[key_name(xeno)] was executed by [key_name(target_carbon)] with a headbite!")
apply_cooldown()
return ..()
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@
if(target.health < 0)
target.gain_health(abs(target.health)) // gets them out of crit first

target.ExtinguishMob()
target.gain_health(xeno.health * transfer_mod)
target.updatehealth()

Expand Down
Loading