diff options
Diffstat (limited to 'extension')
-rw-r--r-- | extension/src/openvic2/Good.cpp | 18 | ||||
-rw-r--r-- | extension/src/openvic2/Good.hpp | 20 |
2 files changed, 10 insertions, 28 deletions
diff --git a/extension/src/openvic2/Good.cpp b/extension/src/openvic2/Good.cpp index ecd2bfb..e3389de 100644 --- a/extension/src/openvic2/Good.cpp +++ b/extension/src/openvic2/Good.cpp @@ -1,19 +1,3 @@ #include "Good.hpp" -using namespace OpenVic2;; - -Good::Good() = default; - -Good::Good(const godot::String& identifier, const godot::String& category, price_t cost, const godot::String& colour, - bool isAvailable, bool isTradable, bool isMoney, bool hasOverseasPenalty) { - this->identifier = identifier; - this->category = category; - this->cost = cost; - this->colour = colour; - this->isAvailableAtStart = isAvailable; - this->isTradable = isTradable; - this->isMoney = isMoney; - this->hasOverseasPenalty = hasOverseasPenalty; -} - -Good::~Good() = default;
\ No newline at end of file +using namespace OpenVic2; diff --git a/extension/src/openvic2/Good.hpp b/extension/src/openvic2/Good.hpp index dd2e8a8..7953c51 100644 --- a/extension/src/openvic2/Good.hpp +++ b/extension/src/openvic2/Good.hpp @@ -1,25 +1,23 @@ #pragma once #include <string> -#include <godot_cpp/variant/string.hpp> +#include "Types.hpp" namespace OpenVic2 { - class Good { + class Good : HasIdentifier { public: using price_t = float; - godot::String identifier; - godot::String category; + std::string category; price_t cost; - godot::String colour; - bool isAvailableAtStart; + std::string colour; + bool isAvailable; bool isTradable; bool isMoney; bool hasOverseasPenalty; - Good(); - Good(const godot::String& identifier, const godot::String& category, price_t cost, const godot::String& colour, - bool isAvailable, bool isTradable, bool isMoney, bool hasOverseasPenalty); - ~Good(); + Good(std::string const& identifier,std::string const& category, price_t cost, std::string const& colour, + bool isAvailable, bool isTradable, bool isMoney, bool hasOverseasPenalty) : HasIdentifier(identifier), + category(category), cost(cost), colour(colour), isAvailable(isAvailable), isMoney(isMoney), hasOverseasPenalty(hasOverseasPenalty) {}; }; -}
\ No newline at end of file +} |