CleverRaven / Cataclysm-DDA

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

combat exoskeleton pocket management issue #76088

Open sacredsky opened 3 months ago

sacredsky commented 3 months ago

Describe the bug

EXO_TORSO_PLATE can attach MOLLE pockets.

  1. If you put the EXO_TORSO_PLATE(attached with pockets) into the combat exoskeleton without any item in the EXO_TORSO_PLATE's pocket, you can not see the pockets in pocket manage screen if you wear other pockets. (If the EXO_TORSO_PLATE is not in combat exoskeleton or it contains item or it is the only pocket you have, it can be seen.)
  2. All the combat exoskeleton is only 33 cm length, which makes only item less than 33 cm can be put into the EXO_TORSO_PLATE's pocket, which is very wired. Maybe we need to modify the length of the combat exoskeleton.

Attach save file

N/A

Steps to reproduce

  1. Spawn a "medium combat exoskeleton torso armor", a "combat exoskeleton mk2", a "nylon quiver", a "wooden broadhead arrow"
  2. Attach the quiver to armor
  3. put the armor into combat exoskeleton
  4. If you also wear other pockets, like a jeans, you can not see quiver pocket in management screen.
  5. Also you can not pick up arrow due to the length

Expected behavior

  1. you can manage EXO_TORSO_PLATE attached pocket in the management screen
  2. you can put item longer than 33cm into the combat exoskeleton

Screenshots

No response

Versions and configuration

Additional context

No response

sacredsky commented 3 months ago

The second issue is not due to the size of the combat exoskeleton. It is due to the combat exoskeleton's torso plate pocket size, which currently only has "max_contains_volume" and "max_contains_weight", but no "max_item_length".

Follow the code a bit, the current maximum length probably is 20000^(1/3)*1.414=38 cm.

MOLLE pocket attached on other equipment(such as ballistic_vest_heavy) only use the MOLLE pocket limits, with no parent container.

sacredsky commented 3 months ago

Oh, I got the first issue. The default state of the combat exoskeleton is hiding its contents, even through it is still showing the attached plates somehow. If you unhide the combat exoskeleton, the pocket will appear in pocket management.

But if you hide combat exoskeleton again, the attached plates will be correctly hidden this time.