CleverRaven / CleverRaven/Cataclysm-DDA
Problem with the `WATERPROOF` flag
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 13.2k
- Forks
- 4.6k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 205
Description
Describe the bug
According to the documentation:
https://github.com/CleverRaven/Cataclysm-DDA/blob/7483759b4225970c793a30dca96b35619cc17dfb/doc/JSON_FLAGS.md?plain=1#L248
So if I create a clothing with 100% body coverage and jump into the water, I'll stay dry?
I created:
"covers": [ "head", "torso", "leg_l", "leg_r", "arm_l", "arm_r", "foot_l", "foot_r", "mouth", "eyes", "hand_l", "hand_r" ],
Details
[
{
"id": "test_suit",
"type": "ARMOR",
"name": { "str": "TEST suit" },
"description": "TEST",
"weight": "4000 g",
"volume": "14 L",
"price": "1 kUSD 175 USD",
"price_postapoc": "20 USD",
"material": [ "kevlar" ],
"symbol": "[",
"looks_like": "armor_riot",
"color": "brown",
"armor": [
{
"material": [
{ "type": "kevlar", "covered_by_mat": 100, "thickness": 2 }
],
"covers": [ "head", "torso", "leg_l", "leg_r", "arm_l", "arm_r", "foot_l", "foot_r", "mouth", "eyes", "hand_l", "hand_r" ],
"coverage": 100,
"encumbrance": [ 7, 7 ]
}
],
"warmth": 40,
"environmental_protection": 20,
"flags": [ "VARSIZE", "RAINPROOF", "STURDY", "WATERPROOF" ]
}
]
And dived underwater. Everything's great. My body is completely dry.
But if I remove one glove (for example: "hand_r").
"covers": [ "head", "torso", "leg_l", "leg_r", "arm_l", "arm_r", "foot_l", "foot_r", "mouth", "eyes", "hand_l" ],
I get the following situation:
Every part of my body became either damp or soaked.
So I am assuming that this flag is not being handled correctly. Or it needs to have its description (including game description) corrected.
Attach save file
n/a
Steps to reproduce
- Create test armor / modify existing armor (rm13)
- Find a river
- Dive under the water
- See which parts of your body are wet
Expected behavior
The operation of the flag according to its description.
Screenshots
No response
Versions and configuration
- OS: Windows
- OS Version: 10.0.19043 (21H1)
- Game Version: cdda-experimental-2024-08-28-0630 3484533 [64-bit]
- Graphics Version: Tiles
- Game Language: English [en]
- Mods loaded: [
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food],
Portal Storms Ignore NPCs [personal_portal_storms],
Slowdown Fungal Growth [no_fungal_growth],
XXX [XXX]
]
XXX = mod for armor test (a couple of json files)
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the referenced doc/JSON_FLAGS.md entry for WATERPROOF and reproduce the behavior using the test armor JSON described in the issue. Compare full body coverage with the version missing hand_r, then trace the wetness behavior until the flag's documented meaning is explained; done means the implementation and description agree, or the mismatch is documented clearly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100