Skip to content

Commit

Permalink
fix xeno immobilized overlay bein shown too often
Browse files Browse the repository at this point in the history
  • Loading branch information
fira committed Nov 7, 2023
1 parent dd9b2dc commit e14781f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion code/datums/mob_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ var/global/image/hud_icon_hudfocus
tag_holder.overlays += image('icons/mob/hud/hud.dmi', src, "prae_tag")

// Hacky, but works. Currently effects are hard to make with precise timings // Dont worry i'm working on it --fira
var/freeze_found = HAS_TRAIT(src, TRAIT_IMMOBILIZED) // This is gonna trigger all the time...
var/freeze_found = HAS_TRAIT(src, TRAIT_IMMOBILIZED) && !HAS_TRAIT(src, TRAIT_FLOORED) // If they're floored we already have a visual cue for immobilization (they can crawl but..)

if (freeze_found)
freeze_holder.overlays += image('icons/mob/hud/hud.dmi', src, "xeno_freeze")
8 changes: 8 additions & 0 deletions code/modules/mob/living/carbon/human/update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -795,3 +795,11 @@ Applied by gun suicide and high impact bullet executions, removed by rejuvenate,
/mob/living/carbon/human/on_immobilized_trait_loss(datum/source)
. = ..()
update_xeno_hostile_hud()

/mob/living/carbon/human/on_floored_trait_gain(datum/source)
. = ..()
update_xeno_hostile_hud()

/mob/living/carbon/human/on_floored_trait_loss(datum/source)
. = ..()
update_xeno_hostile_hud()

0 comments on commit e14781f

Please sign in to comment.