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

Survivor utility belt tool qualities not usable when sheath contains a knife #40973

Closed
wapcaplet opened this issue May 30, 2020 · 5 comments
Closed
Labels
<Bug> This needs to be fixed Items / Item Actions / Item Qualities Items and how they work and interact

Comments

@wapcaplet
Copy link
Contributor

Describe the bug

When a knife is inserted into the sheath of the survivor utility belt, all the inherent qualities of the belt (screw driving, bolt turning, metal sawing etc.) become unusable for crafting and vehicle maintenance.

Steps To Reproduce

  1. Spawn a survivor utility belt
  2. Spawn a hunting knife, dive knife, or other knife compatible with the belt's sheath
  3. Check crafting and vehicle construction menus - belt's qualities are available
  4. Insert knife into the utility belt sheath (with activate or insert)
  5. Check crafting and vehicle construction menus - belt's qualities are not available

Expected behavior

Qualities provided by the belt should be available, whether or not there are items stored in the sheath.

Screenshots

Belt qualities with nothing in the sheath, and crafting menu for the "antenna" showing metal sawing quality in green / available:

image

Same belt with a dive knife in the sheath - all qualities are shown in the item description, but the belt no longer gives metal sawing quality in the crafting menu, indicated as red / unavailable:

image

Versions and configuration

  • OS: Linux
    • OS Version: Distributor ID: Ubuntu; Description: Pop!_OS 19.10; Release: 19.10; Codename: eoan;
  • Game Version: 0.E-2702-ge4d9a10e67 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food]
    ]

Additional context

@anothersimulacrum anothersimulacrum added <Bug> This needs to be fixed Items / Item Actions / Item Qualities Items and how they work and interact labels May 30, 2020
@wapcaplet
Copy link
Contributor Author

wapcaplet commented May 30, 2020

While testing this, I noticed also that the survivor utility belt's defined "use_action" doesn't seem to work:

"use_action": [ { "type": "holster", "holster_prompt": "Sheath blade", "holster_msg": "You sheath your %s" }, "CROWBAR", "HAMMER" ],

The message "You sheath your ..." is not shown when sheathing a knife. I'm not sure what the "CROWBAR" and "HAMMER" flags are supposed to do here, but neither a crowbar nor a hammer may be stored in the belt unless I add "BELT_CLIP" to the pocket data flag restrictions.

Edit: I think the reason no message is displayed, is that holstering an item is now implemented via the item::put_in method, rather than the holster_actor::store method it once used (which is where the holster_msg message would be displayed).

@ThePotatomancer
Copy link
Contributor

seems that no check is called for survivor belt qualities when there are items in pockets.
the CROWBAR and HAMMER tag mean that you can do crowbar and hammer actions with the tool belt (pry), so they work as intended.
seems like for some reason container qualities are skipped if they are not empty

@kevingranade
Copy link
Member

Now that the tool holding containers are nested containers, this is no longer an issue, right?

@wapcaplet
Copy link
Contributor Author

wapcaplet commented Dec 17, 2020

I can still reproduce this in 0.E-8226-g0f48ccd485, although it is peculiar to which method is used to put the knife in the survivor belt.

Using insert from the survivor belt, after inserting a trench knife, all the belt's qualities remain available for crafting and vehicle maintenance.

However, when I am wearing an empty survivor belt, and picking up the same trench knife from the ground, when it is auto-inserted into my survivor belt sheath, the problem manifests itself - the belt's qualities become unavailable from the crafting and vehicle menus. The same occurs if I activate the belt, and use the holster to put in a knife from my backpack.

Lockpick crafting:
image

Removing a bicycle seat:
image

Furthermore, the method by which the knife is removed from the belt has an effect: If the knife is removed from the belt by being explicitly inserted into another container (such as my backpack), the belt's qualities remain unavailable for crafting and vehicles, even though its sheath is empty. But if the knife is removed from the belt by dropping the knife on the ground, the belt's qualities are restored in the crafting and vehicle menus.

(There are still no messages whatsoever when sheathing or unsheathing a knife, but that's a separate problem)

@wapcaplet
Copy link
Contributor Author

wapcaplet commented Feb 20, 2021

Now that the tool holding containers are nested containers, this is no longer an issue, right?

I see now what I did not notice when retesting this before - what was formerly known as the "survivor utility belt" was obsoleted in #45302 and replaced with the item named survivor belt (id survivor_belt_notools), which no longer has any tool qualities to begin with. So this bug is indeed no longer valid, since the only affected item is obsolete and cannot appear in the game anymore.

The survivor_belt requirement still appears in some recipe requirements; those should also be removed (see #47618).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed Items / Item Actions / Item Qualities Items and how they work and interact
Projects
None yet
Development

No branches or pull requests

4 participants