From dbc5b1df352f37b90b6ab17798e752be237bbf61 Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 1 Jun 2023 13:06:24 +0200 Subject: [PATCH] Fixed disrepancies between a few getter and setters. --- modules/entity_spell_system/data/loot/loot_data_base.cpp | 2 +- modules/entity_spell_system/data/loot/loot_data_base.h | 2 +- modules/entity_spell_system/entities/auras/aura_data.cpp | 2 +- modules/entity_spell_system/entities/auras/aura_data.h | 2 +- modules/props/tiled_wall/tiled_wall.cpp | 2 +- modules/props/tiled_wall/tiled_wall.h | 2 +- modules/props_2d/props/prop_2d_data_tiled_wall_2d.cpp | 2 +- modules/props_2d/props/prop_2d_data_tiled_wall_2d.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/entity_spell_system/data/loot/loot_data_base.cpp b/modules/entity_spell_system/data/loot/loot_data_base.cpp index ea834b87b..d5a4dfadb 100644 --- a/modules/entity_spell_system/data/loot/loot_data_base.cpp +++ b/modules/entity_spell_system/data/loot/loot_data_base.cpp @@ -27,7 +27,7 @@ SOFTWARE. int LootDataBase::get_loot_db_size() const { return _loot_dbs.size(); } -void LootDataBase::set_loot_db_size(const float value) { +void LootDataBase::set_loot_db_size(const int value) { _loot_dbs.resize(value); } diff --git a/modules/entity_spell_system/data/loot/loot_data_base.h b/modules/entity_spell_system/data/loot/loot_data_base.h index b26321080..5756677c2 100644 --- a/modules/entity_spell_system/data/loot/loot_data_base.h +++ b/modules/entity_spell_system/data/loot/loot_data_base.h @@ -32,7 +32,7 @@ class LootDataBase : public Resource { public: int get_loot_db_size() const; - void set_loot_db_size(const float value); + void set_loot_db_size(const int value); int get_items_size() const; void set_items_size(const int value); diff --git a/modules/entity_spell_system/entities/auras/aura_data.cpp b/modules/entity_spell_system/entities/auras/aura_data.cpp index 35d94ab2d..70c9d81b6 100644 --- a/modules/entity_spell_system/entities/auras/aura_data.cpp +++ b/modules/entity_spell_system/entities/auras/aura_data.cpp @@ -29,7 +29,7 @@ SOFTWARE. #include "../../defines.h" -float AuraData::damage_get_count() { +int AuraData::damage_get_count() { return _damage_already_taken; } diff --git a/modules/entity_spell_system/entities/auras/aura_data.h b/modules/entity_spell_system/entities/auras/aura_data.h index 32d956a7d..fb1edb3cf 100644 --- a/modules/entity_spell_system/entities/auras/aura_data.h +++ b/modules/entity_spell_system/entities/auras/aura_data.h @@ -67,7 +67,7 @@ public: int damage_get(); void damage_set(int value); - float damage_get_count(); + int damage_get_count(); void damage_set_count(int damageTaken); float get_tick(); diff --git a/modules/props/tiled_wall/tiled_wall.cpp b/modules/props/tiled_wall/tiled_wall.cpp index db6168a4b..fce3aa866 100644 --- a/modules/props/tiled_wall/tiled_wall.cpp +++ b/modules/props/tiled_wall/tiled_wall.cpp @@ -59,7 +59,7 @@ void TiledWall::set_data(const Ref &data) { bool TiledWall::get_collision() const { return _collision; } -void TiledWall::set_collision(const int value) { +void TiledWall::set_collision(const bool value) { _collision = value; /* diff --git a/modules/props/tiled_wall/tiled_wall.h b/modules/props/tiled_wall/tiled_wall.h index dbea03be8..808aff1ea 100644 --- a/modules/props/tiled_wall/tiled_wall.h +++ b/modules/props/tiled_wall/tiled_wall.h @@ -46,7 +46,7 @@ public: void set_data(const Ref &data); bool get_collision() const; - void set_collision(const int value); + void set_collision(const bool value); uint32_t get_collision_layer() const; void set_collision_layer(uint32_t p_layer); diff --git a/modules/props_2d/props/prop_2d_data_tiled_wall_2d.cpp b/modules/props_2d/props/prop_2d_data_tiled_wall_2d.cpp index 388734297..16a9731f9 100644 --- a/modules/props_2d/props/prop_2d_data_tiled_wall_2d.cpp +++ b/modules/props_2d/props/prop_2d_data_tiled_wall_2d.cpp @@ -51,7 +51,7 @@ void Prop2DDataTiledWall2D::set_data(const Ref &data) { bool Prop2DDataTiledWall2D::get_collision() const { return _collision; } -void Prop2DDataTiledWall2D::set_collision(const int value) { +void Prop2DDataTiledWall2D::set_collision(const bool value) { _collision = value; } diff --git a/modules/props_2d/props/prop_2d_data_tiled_wall_2d.h b/modules/props_2d/props/prop_2d_data_tiled_wall_2d.h index 1e48c33e2..75d54e2de 100644 --- a/modules/props_2d/props/prop_2d_data_tiled_wall_2d.h +++ b/modules/props_2d/props/prop_2d_data_tiled_wall_2d.h @@ -41,7 +41,7 @@ public: void set_data(const Ref &data); bool get_collision() const; - void set_collision(const int value); + void set_collision(const bool value); bool _processor_handles(Node *node); void _processor_process(Ref prop_data, Node *node, const Transform2D &transform, Ref entry = Ref());