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

Item editor ranged, magazine and ammo configuration #46

Merged
merged 119 commits into from
Mar 5, 2024

Conversation

snipercup
Copy link
Collaborator

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

Changes nothing gameplay-wise, but it allows you to edit items and give them properties for ranged weapons, magazine and ammo.

  • In the item editor, adds the ranged, magazine and ammo tabs
  • When the item is saved, the properties from the respective tabs is saved to the item json
  • When the item is loaded into the item editor, the corresponding tab will be visible, allowing you to make edits
  • I copied these properties from item_manager.gd. Their function will be decided later
  • Adds a 9mm pistol and m4a1 rifle as items. They both use the same ammo for now
  • Using this implementation means items do not have their own type, but if an item has the 'ranged' key, that means it's a ranged weapon. We use that instead of explicitly defining a type.

Here you can see the 'ranged' type is selected and the 'ranged' tab is visible
image

You can then switch over to the ranged tab:
image

When pressing the save button, it will be saved as
image

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 marked this pull request as ready for review March 5, 2024 15:50
@snipercup snipercup merged commit 8d3fb1d into Khaligufzel:main Mar 5, 2024
@snipercup snipercup deleted the item-editor-ranged branch March 5, 2024 15:50
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