You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removing the last item from a Character's inventory intentionally sets the inventory to null. The comment in the code seems to indicate this is to prevent the case where an NPC has a default inventory, then during gameplay has its items removed, then is serialized, then is hydrated, and we needed a way to tell the difference between "This NPC had all of its items removed and should still have an empty inventory" and "This NPC has never had its default inventory setup and needs the items spawned"
I think this is irrelevant given that NPCs are never saved/rehydrated. And even if they were I would let someone else deal with that issue. We should no longer unset Character inventory when removing the last item, it creates way too many issues
The text was updated successfully, but these errors were encountered:
Ha, I just noticed this too. At the very least, if you wanted to keep the feature, I would think that you'd just create a new property on the Inventory class to keep track of this. But I really don't think there's any pressing need to keep it.
Removing the last item from a Character's inventory intentionally sets the inventory to null. The comment in the code seems to indicate this is to prevent the case where an NPC has a default inventory, then during gameplay has its items removed, then is serialized, then is hydrated, and we needed a way to tell the difference between "This NPC had all of its items removed and should still have an empty inventory" and "This NPC has never had its default inventory setup and needs the items spawned"
I think this is irrelevant given that NPCs are never saved/rehydrated. And even if they were I would let someone else deal with that issue. We should no longer unset Character inventory when removing the last item, it creates way too many issues
The text was updated successfully, but these errors were encountered: