Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/StarItemDatabase.hpp
diff options
context:
space:
mode:
authorErodeesFleurs <862959461@qq.com>2025-02-10 21:52:08 +0800
committerErodeesFleurs <862959461@qq.com>2025-02-10 21:52:08 +0800
commit0780aee8ab5da99dd4c84352227a5cf87d9146c7 (patch)
treeef7813afadb719389ced68cb02cfc931b086b8be /source/game/StarItemDatabase.hpp
parenteef0da37e1b206a9d486c5ad74bb10b11944503b (diff)
Add root.itemFile config
Diffstat (limited to 'source/game/StarItemDatabase.hpp')
-rw-r--r--source/game/StarItemDatabase.hpp5
1 files changed, 4 insertions, 1 deletions
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<float> level = {}, Maybe<uint64_t> seed = {}) const;
+ // Returns the path to the item's json file in the assets.
+ Maybe<String> 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<ItemT>& itemPtr) c
return false;
}
}
-}
+} \ No newline at end of file