From 92d086c10ba315ffcd8e3b99d76bc99f55e9467a Mon Sep 17 00:00:00 2001 From: Jettford Date: Wed, 11 Dec 2024 19:25:54 +0000 Subject: [PATCH] replace some silly warnings --- dCommon/dEnums/dPlatforms.h | 2 ++ .../ControlBehaviorMessages/MoveToInventoryMessage.h | 1 + dGame/dUtilities/Preconditions.cpp | 2 +- dScripts/02_server/Map/AM/RandomSpawnerFin.cpp | 8 ++++---- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dCommon/dEnums/dPlatforms.h b/dCommon/dEnums/dPlatforms.h index bca7f9e0..4c280408 100644 --- a/dCommon/dEnums/dPlatforms.h +++ b/dCommon/dEnums/dPlatforms.h @@ -8,6 +8,8 @@ #define DARKFLAME_PLATFORM_IOS #elif TARGET_OS_MAC #define DARKFLAME_PLATFORM_MACOS +#pragma clang diagnostic push // prevent pragma messages being counted as a warning +#pragma clang diagnostic ignored "-W#pragma-messages" #else #error unknown Apple operating system #endif diff --git a/dGame/dPropertyBehaviors/ControlBehaviorMessages/MoveToInventoryMessage.h b/dGame/dPropertyBehaviors/ControlBehaviorMessages/MoveToInventoryMessage.h index 30d62eff..6a917b3c 100644 --- a/dGame/dPropertyBehaviors/ControlBehaviorMessages/MoveToInventoryMessage.h +++ b/dGame/dPropertyBehaviors/ControlBehaviorMessages/MoveToInventoryMessage.h @@ -9,6 +9,7 @@ class AMFArrayValue; * @brief Sent when a player moves a Behavior A at position B to their inventory. */ #pragma message("MoveToInventory.h This Control Behavior Message does not have a test yet. Non-developers can ignore this warning.") + class MoveToInventoryMessage : public BehaviorMessageBase { public: MoveToInventoryMessage(const AMFArrayValue& arguments); diff --git a/dGame/dUtilities/Preconditions.cpp b/dGame/dUtilities/Preconditions.cpp index a0aac27e..780793da 100644 --- a/dGame/dUtilities/Preconditions.cpp +++ b/dGame/dUtilities/Preconditions.cpp @@ -137,7 +137,7 @@ bool Precondition::CheckValue(Entity* player, const uint32_t value, bool evaluat return inventoryComponent->GetLotCount(value) >= count; case PreconditionType::DoesNotHaveItem: - return inventoryComponent->IsEquipped(value) < count; + return (inventoryComponent->IsEquipped(value) ? 1 : 0) < count; case PreconditionType::HasAchievement: if (missionComponent == nullptr) return false; return missionComponent->GetMissionState(value) >= eMissionState::COMPLETE; diff --git a/dScripts/02_server/Map/AM/RandomSpawnerFin.cpp b/dScripts/02_server/Map/AM/RandomSpawnerFin.cpp index 57793511..a57358d9 100644 --- a/dScripts/02_server/Map/AM/RandomSpawnerFin.cpp +++ b/dScripts/02_server/Map/AM/RandomSpawnerFin.cpp @@ -65,13 +65,13 @@ void RandomSpawnerFin::OnStartup(Entity* self) { }; sectionMultipliers = { - {"secA", 1}, - {"secB", 1}, + {"secA", 1.0f}, + {"secB", 1.0f}, {"secC", 1.2f}, {"secD", 1.3f}, {"secE", 1.6f}, - {"secF", 1}, - {"secG", 1}, + {"secF", 1.0f}, + {"secG", 1.0f}, {"secH", 1.2f}, };