"Holster_Gun" use action

0.C - 3430
Curses

Not sure if this is a bug, or is just something that wasn’t coded into the game.

When combining any other use action with “holster_gun”, it gives this error:

DEBUG: Couldn't find item action named HOLSTER_GUN

As far as i can tell, the other actions (I used sheath_knife) work as expected.

EDIT: For the code, i wrote it as

"use_action" : [ "HOLSTER_GUN", "SHEATH_KNIFE" ], "properties" : [["holster_size", "5"]]

The use_action itself seems to work quite well, if there’s only HOLSTER_GUN. If you throw in another use_action, you get the error message.

We don’t have currently any items that are able to do both (hold gun and knife).

The debug message is a bit unclear on “where” is it not found:
When defining an item with multiple use actions, all of those actions need to be defined in data/json/item_actions.json. This is because they get their description from that file.

[quote=“Coolthulhu, post:3, topic:10129”]The debug message is a bit unclear on “where” is it not found:
When defining an item with multiple use actions, all of those actions need to be defined in data/json/item_actions.json. This is because they get their description from that file.[/quote]

Ah-ha! Thanks coolthulhu, putting “Holster_Gun” in the “item_actions.json” fixed the problem.

[quote=“RADIALTHRONE1, post:4, topic:10129”][quote=“Coolthulhu, post:3, topic:10129”]The debug message is a bit unclear on “where” is it not found:
When defining an item with multiple use actions, all of those actions need to be defined in data/json/item_actions.json. This is because they get their description from that file.[/quote]

Ah-ha! Thanks coolthulhu, putting “Holster_Gun” in the “item_actions.json” fixed the problem.[/quote]

Well, it fixed that part of the problem. New problem: if i have something stored (knife or gun) i cant store anything else, it will just draw the stored item out.

This one isn’t fixable from the json side (you’d have to edit the sources). Holsters are hardcoded to only store one item at a time. Boots can be used to store two knives, but that wouldn’t work with pistols (holster function would still draw the first item and wouldn’t allow storing the second).