From 080a66692bc27c9b7e45a89700383e8cc8c62c4a Mon Sep 17 00:00:00 2001 From: Vankata453 <78196474+Vankata453@users.noreply.github.com> Date: Fri, 6 Dec 2024 01:38:21 +0200 Subject: [PATCH] Fix missing goldbomb "ticking-glow", attempt to fix dark `WeakBlock` "burn-light" --- data/images/creatures/gold_bomb/gold_bomb.sprite | 2 +- src/object/weak_block.cpp | 12 ++++++++++++ src/object/weak_block.hpp | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/data/images/creatures/gold_bomb/gold_bomb.sprite b/data/images/creatures/gold_bomb/gold_bomb.sprite index 3b0d042581..6492599a87 100644 --- a/data/images/creatures/gold_bomb/gold_bomb.sprite +++ b/data/images/creatures/gold_bomb/gold_bomb.sprite @@ -179,6 +179,6 @@ (mirror-action "ticking-left")) (linked-sprites - (ticking-glow "images/creatures/mr_bomb/ticking_glow/ticking_glow.sprite") + (ticking-glow "images/creatures/mr_bomb/ticking_glow/ticking_glow.sprite" "exploding") ) ) diff --git a/src/object/weak_block.cpp b/src/object/weak_block.cpp index efa26bd655..7fa214a405 100644 --- a/src/object/weak_block.cpp +++ b/src/object/weak_block.cpp @@ -81,6 +81,18 @@ WeakBlock::get_linked_sprites() return {}; } +void +WeakBlock::on_sprite_update() +{ + MovingSprite::on_sprite_update(); + + if (m_type == HAY) + { + m_burn_sprite->set_blend(Blend::ADD); + m_burn_sprite->set_color(Color(0.3f, 0.2f, 0.1f)); + } +} + void WeakBlock::update_version() { diff --git a/src/object/weak_block.hpp b/src/object/weak_block.hpp index 71ca161608..e227b68820 100644 --- a/src/object/weak_block.hpp +++ b/src/object/weak_block.hpp @@ -51,6 +51,8 @@ class WeakBlock final : public MovingSprite protected: LinkedSprites get_linked_sprites() override; + void on_sprite_update() override; + private: virtual HitResponse collision_bullet(Bullet& bullet, const CollisionHit& hit);