From 383583733b2f4cd8c5e632c160afdb987b8615af Mon Sep 17 00:00:00 2001 From: Wolfgang Aigner Date: Thu, 6 Apr 2023 17:10:13 +0200 Subject: Basic loading of goods defined in goods.json --- extension/src/openvic2/LoadGoods.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 extension/src/openvic2/LoadGoods.hpp (limited to 'extension/src/openvic2/LoadGoods.hpp') diff --git a/extension/src/openvic2/LoadGoods.hpp b/extension/src/openvic2/LoadGoods.hpp new file mode 100644 index 0000000..41dd75e --- /dev/null +++ b/extension/src/openvic2/LoadGoods.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include +#include +#include "Good.hpp" + +namespace OpenVic2 { + class LoadGoods { + private: + static bool extract_property_from_json(const godot::Variant& variant, std::vector& goods, int32_t index); + + public: + static std::vector load_goods_from_disk(godot::String const& file_path); + }; +} \ No newline at end of file -- cgit v1.2.3-56-ga3b1