Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partydata inventorydata default management #186

Merged

Conversation

Sbrebbaz
Copy link
Collaborator

@Sbrebbaz Sbrebbaz commented Nov 2, 2023

Created InventoryData and PartyData SOs
Created DefaultInventoryData and DefaultPartyMemberData SOs instances
Created converter to Convert ItemData to InventoryItems
Updated InventoryMonoSystem to read the default inventory from ConfigurationMonoSystem
Updated PartyMonoSystem to read the default inventory from ConfigurationMonoSystem
Updated serializer settings for managing abstract item data + SaveFileSerializationBinder

Closes #180
Closes #182
Closes #166

Created DefaultInventoryData and DefaultPartyMemberData SOs instances
Created converter to Convert ItemData to InventoryItems
Updated InventoryMonoSystem to read the default inventory from ConfigurationMonoSystem
Updated PartyMonoSystem to read the default inventory from ConfigurationMonoSystem (WIP)
Updated serializer settings for managing abstract item data
Updated partyMember management for save files
Created converted classes for partyMember and partyMemberData
yokozach
yokozach previously approved these changes Nov 3, 2023
@GenoImel
Copy link
Owner

GenoImel commented Nov 4, 2023

I ended up tagging in one this one, because we ran into an issue where we needed to serialize a Dictionary. While I was at it, I made a few other changes. All additional changes are listed below:

Changes:

  • Added SerializedDictionary utility class via ayellowpaper's Unity Package (See it here.)
  • Changed the InventoryData Scriptable Object to use a SerializedDictionary so that we could pair ItemBaseData entries with an int count.
  • Went ahead and created some placeholder SkillsData SOs to test out using these in the PartyMemberData SOs and make sure everything serializes properly in the json SaveFile.
  • Moved our default PartyMemberData SOs to the Default folder, removed blank DefaultSkill and DefaultPartyMember, as they are not needed.
  • Modified the GetDefaultInventory() method in our IConfigMonoSystem to accept an InventoryData SO as a parameter, because it was being squirrely about accepting a SerializedDictionary. (Honestly though, I might've been sleepy, but this works just fine.)

@GenoImel GenoImel requested a review from yokozach November 4, 2023 13:09
Copy link
Owner

@GenoImel GenoImel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this, and also great job finding that Unity Package while we were working through the serialized Dictionary problem. 😄

@GenoImel GenoImel merged commit 186f105 into main Nov 5, 2023
@GenoImel GenoImel deleted the feature/180-182-partydata-inventorydata-default-management branch November 5, 2023 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants