From 0780aee8ab5da99dd4c84352227a5cf87d9146c7 Mon Sep 17 00:00:00 2001 From: ErodeesFleurs <862959461@qq.com> Date: Mon, 10 Feb 2025 21:52:08 +0800 Subject: Add root.itemFile config --- source/game/StarItemDatabase.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/game/StarItemDatabase.hpp') diff --git a/source/game/StarItemDatabase.hpp b/source/game/StarItemDatabase.hpp index d5b86fc..714eee7 100644 --- a/source/game/StarItemDatabase.hpp +++ b/source/game/StarItemDatabase.hpp @@ -110,6 +110,9 @@ public: // of the unique item data or may be ignored. ItemConfig itemConfig(String const& itemName, Json parameters, Maybe level = {}, Maybe seed = {}) const; + // Returns the path to the item's json file in the assets. + Maybe itemFile(String const& itemName) const; + // Generates the config for the given item descriptor and then loads the item // from the appropriate factory. If there is a problem instantiating the // item, will return a default item instead. If item is passed a null @@ -212,4 +215,4 @@ bool ItemDatabase::diskLoad(Json const& diskStore, shared_ptr& itemPtr) c return false; } } -} +} \ No newline at end of file -- cgit v1.2.3