CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.28k stars 4.12k forks source link

Deploying/Deactivating turrets duplicates ammo and materializes magazines. #56603

Open John-Candlebury opened 2 years ago

John-Candlebury commented 2 years ago

Describe the bug

When deploying a robot turret with ammo belts, you'll transfer the ammo to the monster inventory, but neither the ammo nor the belt will be removed from the inventory. If you then deactivate the turret youll also recieve a copy of all the ammo you didnt actually put there.

Additionally if the turret is killed, the duplicated ammo will be contained in a brand new ammo belt/compatible magazine.

Steps to reproduce

  1. Spawn a turret and a compatible ammo belt.
  2. Deploy the turret, you'll load ammo into it, but it wont dissapear from your inventory.
  3. Deactivate the turret, ammo is duplicated.
  4. Repeat step 2 but now kill the turret instead of deactivating it. The dropped ammo is contained in a new magazine.

Expected behavior

No Duplications. Probably some sane handling of the turret magazines, so you need to put a single one in and then get it back

Screenshots

No response

Versions and configuration

Additional context

No response

Night-Pryanik commented 1 year ago

Could you give an example of deployable turret with ammo belts? AFAIK there are no such turrets in vanilla.

For ordinary vanilla 9x19mm turret all is working as it should: game correctly removes ammo from the inventory on deploying of turret and gives them back on deactivating it.

John-Candlebury commented 1 year ago

Yes of course this Issue was tested and reproduced with a 'M249 autonomous CROWS II' which can be stored and redeployed in game

Night-Pryanik commented 1 year ago

I still can't reproduce this issue on 0.F-12274.

I have a M249 CROWS II and an ammo belt loaded with 500 5.56 M855. изображение

I deployed the turret, but it didn't take ammo from the ammo belt: изображение изображение

The turret has taken loose ammo from the inventory: изображение изображение

Deactivating the non-loaded turret didn't give me any ammo (obviously)