branchrust_reboot/main/ammo_count_in_chestscancel

7 Commits over 0 Days - ∞cph!

6 Months Ago
Moved #CLIENT outside of #SERVER block to fix unload ammo menu option not showing
6 Months Ago
Merge from main -> ammo_count_in_chests
6 Months Ago
Fixed SERVER compile errors
6 Months Ago
Remove tracking every item on the server Instead, get the ammo count from the held entity when calling Item.Save()
6 Months Ago
Merge from main -> ammo_count_in_chests
6 Months Ago
Allow unloading guns inside chests Update ItemIcon.selectedItem before calling OnInventoryUpdated() so that menu options update when your selected item changes
6 Months Ago
Add `ammoCount` to Item and fallback to the item's ammo count when inside a chest / locker / player inventory (other than hotbar) Track all items on the server in `ItemManager.serverItems` dictionary so the item can be updated every time the `BaseProjectile` ammo is modified (normally it only can find item when inside player inventory) Save ammoCount in protobuf as an Int where 0 = null, 1 = 0, etc (since protobuf doesn't support nullable types)