[MIRROR] [NO GBP] Style meter fixes [MDB IGNORE] (#20896)

* [NO GBP] Style meter fixes (#75090)

## About The Pull Request
Fixes:

- Crusher mark score applying to attacked corpses
- Parrying not working, in 2 different forms
- The style bar not being accurate with >= 600 style points

## Why It's Good For The Game
Bugs bad

## Changelog
🆑
fix: Style meter parrying works again
fix: Style meter bar now works correctly with very high style point
count
/🆑

* [NO GBP] Style meter fixes

---------

Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-05-02 15:45:08 -04:00
committed by GitHub
co-authored by Zonespace
parent 633fa8140b
commit ef6828cf15
2 changed files with 7 additions and 3 deletions
+5 -2
View File
@@ -115,7 +115,7 @@
RegisterSignal(parent, COMSIG_LIVING_CRUSHER_DETONATE, PROC_REF(on_crusher_detonate))
RegisterSignal(parent, COMSIG_LIVING_DISCOVERED_GEYSER, PROC_REF(on_geyser_discover))
projectile_parry = WEAKREF(AddComponent(\
projectile_parry = WEAKREF(parent.AddComponent(\
/datum/component/projectile_parry,\
list(\
/obj/projectile/colossus,\
@@ -229,7 +229,7 @@
/datum/component/style/proc/update_meter(new_rank, go_back)
if(!isnull(go_back))
animate(meter_image.get_filter("meter_mask"), time = 0 SECONDS, flags = ANIMATION_END_NOW, x = go_back)
animate(meter_image.get_filter("meter_mask"), time = 1 SECONDS, x = (rank > new_rank ? 0 : (rank < new_rank ? 100 : (style_points % 100) + 1)))
animate(meter_image.get_filter("meter_mask"), time = 1 SECONDS, x = (rank > new_rank ? 0 : ((rank < new_rank) || (style_points >= 500) ? 100 : (style_points % 100) + 1)))
if(!isnull(new_rank) && new_rank != rank && !timerid)
timerid = addtimer(CALLBACK(src, PROC_REF(update_screen), new_rank), 1 SECONDS)
@@ -426,6 +426,9 @@
/datum/component/style/proc/on_crusher_detonate(datum/source, mob/living/target, obj/item/kinetic_crusher/crusher, backstabbed)
SIGNAL_HANDLER
if(target.stat == DEAD)
return
var/has_brimdemon_trophy = locate(/obj/item/crusher_trophy/brimdemon_fang) in crusher.trophies
add_action(ACTION_MARK_DETONATED, round((backstabbed ? 60 : 30) * (ismegafauna(target) ? 1.5 : 1) * (has_brimdemon_trophy ? 1.25 : 1)))