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

Magazine reloading #61

Merged
merged 199 commits into from
Mar 5, 2024
Merged

Conversation

snipercup
Copy link
Collaborator

@snipercup snipercup commented Feb 1, 2024

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

You can now run out of bullets

  • Changed the relationship between the equippedItem and the Equipmentslot. EquippedItem will handle firing and managing the reload constraints. EquipmentSlot will interact with the inventory to manage the magazines
  • Added the "current_ammo" property as an editable field in the magazine editor. In the future we might specify a range here to create half-spent magazines
  • Magazines are removed from the inventory and stored in the equipmentslot while they are inside the weapon. When a reload happens, the current magazine is added to the inventory and a different one will be loaded into the weapon (equipmentslot)
  • When reloading, the magazine in the player inventory with the most bullets is chosen
  • The player can drop a magazine from the inventory onto the gun to reload it with that specific magazine
  • When an item is unequipped, the magazine is also returned to the inventory. Right now the only way to have a loaded weapon is to equip it and then reload it.
  • Made the action timer and handling more generic. We can now pass a function to General with a time duration and it will call that function when the time runs out. It will also enforce that only one action is executed at a time

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 Feb 2, 2024
@snipercup snipercup marked this pull request as ready for review March 5, 2024 15:54
@snipercup snipercup merged commit 19f405b into Khaligufzel:main Mar 5, 2024
@snipercup snipercup deleted the magazine-reloading branch March 5, 2024 15:54
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