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

Items of type MAGAZINE cannot be reloaded if ammunition is liquid #40766

Closed
ghost opened this issue May 23, 2020 · 6 comments
Closed

Items of type MAGAZINE cannot be reloaded if ammunition is liquid #40766

ghost opened this issue May 23, 2020 · 6 comments
Labels
Good First Issue This is a good first issue for a new contributor [JSON] Changes (can be) made in JSON (S1 - Need confirmation) Report waiting on confirmation of reproducibility

Comments

@ghost
Copy link

ghost commented May 23, 2020

Describe the bug

Magazines whose contents are intended to be liquid, such as pressurized fuel tanks for flamethrowers, cannot be reloaded. Attempting to reload them will result in the message that you do not have the available ammunition, even if correct ammunition is presently available. This occurs even if the magazine in question is given the proper watertight magazine pocket_data.

Airtight magazines, if added, are also affected but behave slightly differently (see below).

Steps To Reproduce

  1. Check that pressurized fuel tanks have appropriate pocket_data, it should presently as of Add pocket data to all magazines #40295.
  2. Debug spawn in a pressurized fuel tank. Note that it will spawn
    2b. Alternatively, were you to test this with a magazine containing gaseous ammunition (I do not recall if any exist in vanilla) with the appropriate airtight boolean, take note that it will spawn empty instead. This is the only difference in behavior observed thus far.
  3. Unload the napalm it spawns with into an available empty container.
  4. Attempt to reload the magazine. It will report that no ammunition is available, despite having just unloaded it.

Expected behavior

The magazine will recognize the presence of available ammunition if properly contained (excluding uncontained/spilt liquids), as magazines do if the expected ammo is solid.

Versions and configuration

  • OS: Windows
    • OS Version: 10.0 1803
  • Game Version: 0.E-2382-g48f8edf [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food]
    ]

Additional context

The normal message for failure to load under current functionality is to instead state that the item in question cannot be loaded.

@KorGgenT
Copy link
Member

the fix is simple: add "watertight" to the pocket.

@KorGgenT KorGgenT added <Bug> This needs to be fixed [JSON] Changes (can be) made in JSON Good First Issue This is a good first issue for a new contributor labels May 23, 2020
@KorGgenT
Copy link
Member

upon further inspection, it already is watertight. did you test this or are you going on hearsay? https://github.com/CleverRaven/Cataclysm-DDA/blob/master/data/json/items/magazine/chemical_spray.json#L19

@KorGgenT KorGgenT added (S1 - Need confirmation) Report waiting on confirmation of reproducibility and removed <Bug> This needs to be fixed labels May 23, 2020
@ghost
Copy link
Author

ghost commented May 23, 2020

It still does not function, as of my recent test on the said build: https://cdn.discordapp.com/attachments/709600070810730518/713608674823634944/unknown.png

"pocket_data": [ { "pocket_type": "MAGAZINE", "ammo_restriction": { "flammable": 500 }, "watertight": true } ]

@KorGgenT
Copy link
Member

image
cannot confirm on latest master.

@ghost
Copy link
Author

ghost commented May 23, 2020

Retested on the next build that was released, current latest available version. This is still present.

Moar details

From your screenshot, the lack of a secondary container suggests you did not test actually loading a magazine, just spawning one. As already noted in the inital, they correctly spawn fully-loaded, but cannot be reloaded once emptied (or if naturally spawned empty in the world).

Please re-test this and follow the listed steps, ensuring that you have a valid container to unload the fuel tank's contents into to attempt reloading the fuel tank.

@ghost
Copy link
Author

ghost commented May 23, 2020

It seems this was fixed in either build 10689 or 10688, which were not available in releases as of last test.

Sowwy

Apologies for the mistake.

@ghost ghost closed this as completed May 23, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue This is a good first issue for a new contributor [JSON] Changes (can be) made in JSON (S1 - Need confirmation) Report waiting on confirmation of reproducibility
Projects
None yet
Development

No branches or pull requests

1 participant