Skip to content

Commit

Permalink
Burrower burrow changes and fixes (#3818)
Browse files Browse the repository at this point in the history
# About the pull request

The PR contains mostly fixes for the Burrower that have been around,
that being that other xenos could slash them while they were burrowed,
that they could resist (and get rid of fire) while burrowed, that they
still took shrapnel and direct flame damage while burrowed, that SG
autofire and sentries were shooting at a burrowed burrower, wasting ammo
in the process.

Two other notable changes are that the unburrow stun now also works on
other non-friendly xenomorphs (and it works on all of them, skill issue
if you manage to get stunned from that as a T3/Queen) and that burrowing
and unburrowing now has sounds (a change many people were positive about
when it was initially included in the Impaler PR) which may find
tracking and noticing the presence of burrowers easier.

burrowing sound: https://voca.ro/1dQ0pvBMidsr
unburrowing sound: https://vocaroo.com/1zzEz3NQ2Kx5

# Explain why it's good for the game

Bugfixes and a counter to one of the most annoying abilities (that
people consider) in the game.


# Testing Photographs and Procedure

<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog

:cl: Unknownity
fix: Fixed burrowed mobs being able to be targeted by sentries, mines
and SG autofire.
fix: Fixed burrowed mobs being able to grab mobs on the surface.
fix: Fixed burrowed mobs being able to resist while burrowed.
fix: Fixed burrowers taking damage from direct flame and shrapnel from
explosions.
fix: Fixed burrowers being able to get slashed from enemy Xenos on the
surface.
fix: Fixed burrowers unburrow stun to now properly target and stun enemy
Xenos.
soundadd: Added sounds for the Burrower when they are burrowing and
unburrowing.
/:cl:

Co-authored-by: Unknownity <a>
  • Loading branch information
Unknownity committed Jul 13, 2023
1 parent 2e60639 commit d26452b
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 8 deletions.
5 changes: 4 additions & 1 deletion code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@
#define TRAIT_ABILITY_NO_PLASMA_TRANSFER "t_ability_no_plasma_transfer"
/// Shows that the xeno queen is on ovi
#define TRAIT_ABILITY_OVIPOSITOR "t_ability_ovipositor"
/// Used for burrowed mobs, prevent's SG/sentrys/claymores from autofiring
#define TRAIT_ABILITY_BURROWED "t_ability_burrowed"

//-- item traits --
// TOOL TRAITS
Expand Down Expand Up @@ -233,7 +235,8 @@ GLOBAL_LIST_INIT(mob_traits, list(
TRAIT_TWOBORE_TRAINING,
TRAIT_LEADERSHIP,
TRAIT_DEXTROUS,
TRAIT_REAGENT_SCANNER
TRAIT_REAGENT_SCANNER,
TRAIT_ABILITY_BURROWED
))

/*
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/items/explosives/mine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@
return
if(L.get_target_lock(iff_signal) || isrobot(L))
return
if(HAS_TRAIT(L, TRAIT_ABILITY_BURROWED))
return
L.visible_message(SPAN_DANGER("[icon2html(src, viewers(src))] The [name] clicks as [L] moves in front of it."), \
SPAN_DANGER("[icon2html(src, L)] The [name] clicks as you move in front of it."), \
SPAN_DANGER("You hear a click."))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/defenses/sentry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@
targets.Remove(A)
continue

if(M.get_target_lock(faction_group) || M.invisibility)
if(M.get_target_lock(faction_group) || M.invisibility || HAS_TRAIT(M, TRAIT_ABILITY_BURROWED))
if(M == target)
target = null
targets.Remove(M)
Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@
if (M.fortify || M.burrow)
return XENO_NO_DELAY_ACTION

if(HAS_TRAIT(src, TRAIT_ABILITY_BURROWED))
return XENO_NO_DELAY_ACTION

if(islarva(M)) //Larvas can't eat people
M.visible_message(SPAN_DANGER("[M] nudges its head against \the [src]."), \
SPAN_DANGER("You nudge your head against \the [src]."), null, null, CHAT_TYPE_XENO_FLUFF)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/Xenomorph.dm
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,8 @@
if(SEND_SIGNAL(AM, COMSIG_MOVABLE_XENO_START_PULLING, src) & COMPONENT_ALLOW_PULL)
return do_pull(AM, lunge, no_msg)

if(burrow)
return
if(!isliving(AM))
return FALSE
var/mob/living/L = AM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@
density = FALSE
if(caste.fire_immunity == FIRE_IMMUNITY_NONE)
RegisterSignal(src, COMSIG_LIVING_PREIGNITION, PROC_REF(fire_immune))
RegisterSignal(src, COMSIG_LIVING_FLAMER_CROSSED, PROC_REF(flamer_crossed_immune))
RegisterSignal(src, list(
COMSIG_LIVING_FLAMER_CROSSED,
COMSIG_LIVING_FLAMER_FLAMED,
), PROC_REF(flamer_crossed_immune))
ADD_TRAIT(src, TRAIT_ABILITY_BURROWED, TRAIT_SOURCE_ABILITY("Burrow"))
playsound(src.loc, 'sound/effects/burrowing_b.ogg', 25)
update_canmove()
update_icons()
addtimer(CALLBACK(src, PROC_REF(do_burrow_cooldown)), (caste ? caste.burrow_cooldown : 5 SECONDS))
Expand All @@ -65,21 +70,29 @@
to_chat(src, SPAN_NOTICE("You resurface."))
burrow = FALSE
if(caste.fire_immunity == FIRE_IMMUNITY_NONE)
UnregisterSignal(src, COMSIG_LIVING_PREIGNITION)
UnregisterSignal(src, COMSIG_LIVING_FLAMER_CROSSED)
UnregisterSignal(src, list(
COMSIG_LIVING_PREIGNITION,
COMSIG_LIVING_FLAMER_CROSSED,
COMSIG_LIVING_FLAMER_FLAMED,
))
REMOVE_TRAIT(src, TRAIT_ABILITY_BURROWED, TRAIT_SOURCE_ABILITY("Burrow"))
frozen = FALSE
invisibility = FALSE
anchored = FALSE
density = TRUE
for(var/mob/living/carbon/human/H in loc)
H.apply_effect(2, WEAKEN)
playsound(loc, 'sound/effects/burrowoff.ogg', 25)
for(var/mob/living/carbon/mob in loc)
if(!can_not_harm(mob))
mob.apply_effect(2, WEAKEN)

addtimer(CALLBACK(src, PROC_REF(do_burrow_cooldown)), (caste ? caste.burrow_cooldown : 5 SECONDS))
update_canmove()
update_icons()

/mob/living/carbon/xenomorph/proc/do_burrow_cooldown()
used_burrow = FALSE
to_chat(src, SPAN_NOTICE("You can now surface."))
if(burrow)
to_chat(src, SPAN_NOTICE("You can now surface."))
for(var/X in actions)
var/datum/action/act = X
act.update_button_icon()
Expand Down
6 changes: 6 additions & 0 deletions code/modules/mob/living/living_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
to_chat(src, SPAN_WARNING("You can't resist in your current state."))
return

if(isxeno(src))
var/mob/living/carbon/xenomorph/xeno = src
if(xeno.burrow)
to_chat(src, SPAN_WARNING("You can't resist in your current state."))
return

resisting = TRUE

next_move = world.time + 20
Expand Down
Binary file added sound/effects/burrowing_b.ogg
Binary file not shown.
Binary file added sound/effects/burrowoff.ogg
Binary file not shown.

0 comments on commit d26452b

Please sign in to comment.