diff options
author | WasabiRaptor <ketchupraptor@gmail.com> | 2024-03-08 18:14:40 -0500 |
---|---|---|
committer | WasabiRaptor <ketchupraptor@gmail.com> | 2024-03-08 18:14:40 -0500 |
commit | 84fe2dfd4cd8c3134963f90ed693c2562fc71306 (patch) | |
tree | 1db4c9cc9a62f6a1fac6e44d807b309b98e952e7 /source/game/StarItemDatabase.hpp | |
parent | 7bc9eaa43240cfacc826cbaa921daa338af23ca4 (diff) |
Perfectly Generic Item improvements
spawnitem won't create generic items unless you intend to
generic items will retain the data for what item they were if a mod is uninstalled, and will attempt to restore themselves if re-installed
Diffstat (limited to 'source/game/StarItemDatabase.hpp')
-rw-r--r-- | source/game/StarItemDatabase.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/game/StarItemDatabase.hpp b/source/game/StarItemDatabase.hpp index c45f4ca..50a8e35 100644 --- a/source/game/StarItemDatabase.hpp +++ b/source/game/StarItemDatabase.hpp @@ -117,7 +117,7 @@ public: // The returned item pointer will be shared. Either call ->clone() or use item() instead for a copy. ItemPtr itemShared(ItemDescriptor descriptor, Maybe<float> level = {}, Maybe<uint64_t> seed = {}) const; // Same as itemShared, but makes a copy instead. Does not cache. - ItemPtr item(ItemDescriptor descriptor, Maybe<float> level = {}, Maybe<uint64_t> seed = {}) const; + ItemPtr item(ItemDescriptor descriptor, Maybe<float> level = {}, Maybe<uint64_t> seed = {}, bool ignoreInvalid = false) const; bool hasRecipeToMake(ItemDescriptor const& item) const; @@ -159,7 +159,7 @@ private: }; static ItemPtr createItem(ItemType type, ItemConfig const& config); - ItemPtr tryCreateItem(ItemDescriptor const& descriptor, Maybe<float> level = {}, Maybe<uint64_t> seed = {}) const; + ItemPtr tryCreateItem(ItemDescriptor const& descriptor, Maybe<float> level = {}, Maybe<uint64_t> seed = {}, bool ignoreInvalid = false) const; ItemData const& itemData(String const& name) const; ItemRecipe makeRecipe(List<ItemDescriptor> inputs, ItemDescriptor output, float duration, StringSet groups) const; |