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

Save and load player inventory #31

Merged
merged 71 commits into from
Mar 5, 2024

Conversation

snipercup
Copy link
Collaborator

This requires #30 to work. I will publish this PR as a draft to make sure #30 gets merged first.

  • When the player presses the travel button on the overmap, but before actually switching map, the inventory gets saved to General.player_inventory_dict and the dictionary gets saved to /current_save_folder + "/player_inventory.json"
  • When a new map gets loaded, the inventory is loaded from General.player_inventory_dict
  • When the player is at the main menu and presses 'load game', the player_inventory.json file will be read and saved in General.player_inventory_dict

When the materials are generated, set the proper uv scaling so they are correctly visualized in-game.
This fixes the situation where if two map editors are opened, only the last one receives input from the scroll wheel
Improved saving loading, added duplicate and delete buttons, icons
Add name and description labels to show info on a tile
Overmap chunks will stay consistent even after changing scenes.
@snipercup snipercup mentioned this pull request Jan 12, 2024
@snipercup snipercup marked this pull request as ready for review March 5, 2024 15:40
@snipercup snipercup merged commit cab554e into Khaligufzel:main Mar 5, 2024
@snipercup snipercup deleted the inventory-update branch March 5, 2024 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant