Fixed Combine ingame stage 1

Works only if the player does not save /load with only one piece as both are not remembered.
This commit is contained in:
Stranger1992 2022-11-27 21:43:32 +00:00
parent e5f4f5bc94
commit 97b867edf4
2 changed files with 4 additions and 5 deletions

View file

@ -30,7 +30,7 @@ Must one of the following:
Z
e.g. `myItem.rotAxisWhenCurrent = RotationAxis.X`
@tparam int meshBits __Not currently implemented__ (will have no effect regardless of what you set it to)
@tparam ItemAction action is this usable, equippable, or examinable?<br/>
@tparam ItemAction action is this usable, equippable, combineable or examinable?<br/>
Must be one of:
EQUIP
USE
@ -62,9 +62,7 @@ void InventoryItem::Register(sol::table & parent)
// Add validation so the user can't choose something unimplemented
void InventoryItem::SetAction(ItemOptions a_action)
{
bool isSupported = (a_action == ItemOptions::OPT_EQUIP) ||
(a_action == ItemOptions::OPT_USE) ||
(a_action == ItemOptions::OPT_EXAMINABLE);
bool isSupported = (a_action == ItemOptions::OPT_EQUIP) ||(a_action == ItemOptions::OPT_USE) || (a_action == ItemOptions::OPT_EXAMINABLE) || (a_action == ItemOptions::OPT_COMBINABLE);
if (!ScriptAssert(isSupported, "Unsupported item action: " + std::to_string(a_action)))
{

View file

@ -19,7 +19,8 @@ static const std::unordered_map<std::string, ItemOptions> kItemActions
{
{"USE", ItemOptions::OPT_USE},
{"EQUIP", ItemOptions::OPT_EQUIP},
{"EXAMINE", ItemOptions::OPT_EXAMINABLE}
{"EXAMINE", ItemOptions::OPT_EXAMINABLE},
{"COMBINE", ItemOptions::OPT_COMBINABLE}
};
namespace sol