From 098af2333529d394efc69d4910d86ac158722a7a Mon Sep 17 00:00:00 2001 From: Vankata453 <78196474+Vankata453@users.noreply.github.com> Date: Sat, 23 Nov 2024 16:57:34 +0200 Subject: [PATCH] `GameObject`: `get_coins()` -> `get_coins_worth()` --- src/badguy/goldbomb.hpp | 2 +- src/object/bonus_block.cpp | 2 +- src/object/bonus_block.hpp | 2 +- src/object/coin.hpp | 2 +- src/supertux/game_object.hpp | 2 +- src/supertux/level.cpp | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/badguy/goldbomb.hpp b/src/badguy/goldbomb.hpp index a0b05219ef..8bf2b51258 100644 --- a/src/badguy/goldbomb.hpp +++ b/src/badguy/goldbomb.hpp @@ -38,7 +38,7 @@ class GoldBomb final : public MrBomb virtual GameObjectClasses get_class_types() const override { return WalkingBadguy::get_class_types().add(typeid(GoldBomb)); } virtual bool is_snipable() const override { return true; } - int get_coins() const override { return 10; } + int get_coins_worth() const override { return 10; } virtual void explode() override; diff --git a/src/object/bonus_block.cpp b/src/object/bonus_block.cpp index 1c0e9deab3..c3dd0aa447 100644 --- a/src/object/bonus_block.cpp +++ b/src/object/bonus_block.cpp @@ -283,7 +283,7 @@ BonusBlock::get_settings() } int -BonusBlock::get_coins() const +BonusBlock::get_coins_worth() const { if (m_contents == BonusBlock::Content::COIN) return m_hit_counter; diff --git a/src/object/bonus_block.hpp b/src/object/bonus_block.hpp index 7b214c41b2..7f69cc16c5 100644 --- a/src/object/bonus_block.hpp +++ b/src/object/bonus_block.hpp @@ -67,7 +67,7 @@ class BonusBlock final : public Block GameObjectTypes get_types() const override; std::string get_default_sprite_name() const override; - int get_coins() const override; + int get_coins_worth() const override; Content get_contents() const { return m_contents; } int get_hit_counter() const { return m_hit_counter; } diff --git a/src/object/coin.hpp b/src/object/coin.hpp index 03ffdb3273..7756ca2167 100644 --- a/src/object/coin.hpp +++ b/src/object/coin.hpp @@ -52,7 +52,7 @@ class Coin : public MovingSprite, virtual void after_editor_set() override; virtual void editor_update() override; - int get_coins() const override { return 1; } + int get_coins_worth() const override { return 1; } void save_state() override; void check_state() override; diff --git a/src/supertux/game_object.hpp b/src/supertux/game_object.hpp index a15c69b1e1..3e85e8c76d 100644 --- a/src/supertux/game_object.hpp +++ b/src/supertux/game_object.hpp @@ -164,7 +164,7 @@ class GameObject : public ExposableClass /** Returns the amount of coins that this object is worth. This is considered when calculating all coins in a level. */ - virtual int get_coins() const { return 0; } + virtual int get_coins_worth() const { return 0; } /** Indicates if get_settings() is implemented. If true the editor will display Tip and ObjectMenu. */ diff --git a/src/supertux/level.cpp b/src/supertux/level.cpp index 126226f645..581254c881 100644 --- a/src/supertux/level.cpp +++ b/src/supertux/level.cpp @@ -295,7 +295,7 @@ Level::get_total_coins() const for (auto const& sector : m_sectors) { for (const auto& obj : sector->get_objects()) - total_coins += obj->get_coins(); + total_coins += obj->get_coins_worth(); } return total_coins; }