mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-01 09:18:00 +03:00
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:
parent
e5f4f5bc94
commit
97b867edf4
2 changed files with 4 additions and 5 deletions
|
@ -30,7 +30,7 @@ Must one of the following:
|
||||||
Z
|
Z
|
||||||
e.g. `myItem.rotAxisWhenCurrent = RotationAxis.X`
|
e.g. `myItem.rotAxisWhenCurrent = RotationAxis.X`
|
||||||
@tparam int meshBits __Not currently implemented__ (will have no effect regardless of what you set it to)
|
@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:
|
Must be one of:
|
||||||
EQUIP
|
EQUIP
|
||||||
USE
|
USE
|
||||||
|
@ -62,9 +62,7 @@ void InventoryItem::Register(sol::table & parent)
|
||||||
// Add validation so the user can't choose something unimplemented
|
// Add validation so the user can't choose something unimplemented
|
||||||
void InventoryItem::SetAction(ItemOptions a_action)
|
void InventoryItem::SetAction(ItemOptions a_action)
|
||||||
{
|
{
|
||||||
bool isSupported = (a_action == ItemOptions::OPT_EQUIP) ||
|
bool isSupported = (a_action == ItemOptions::OPT_EQUIP) ||(a_action == ItemOptions::OPT_USE) || (a_action == ItemOptions::OPT_EXAMINABLE) || (a_action == ItemOptions::OPT_COMBINABLE);
|
||||||
(a_action == ItemOptions::OPT_USE) ||
|
|
||||||
(a_action == ItemOptions::OPT_EXAMINABLE);
|
|
||||||
|
|
||||||
if (!ScriptAssert(isSupported, "Unsupported item action: " + std::to_string(a_action)))
|
if (!ScriptAssert(isSupported, "Unsupported item action: " + std::to_string(a_action)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,8 @@ static const std::unordered_map<std::string, ItemOptions> kItemActions
|
||||||
{
|
{
|
||||||
{"USE", ItemOptions::OPT_USE},
|
{"USE", ItemOptions::OPT_USE},
|
||||||
{"EQUIP", ItemOptions::OPT_EQUIP},
|
{"EQUIP", ItemOptions::OPT_EQUIP},
|
||||||
{"EXAMINE", ItemOptions::OPT_EXAMINABLE}
|
{"EXAMINE", ItemOptions::OPT_EXAMINABLE},
|
||||||
|
{"COMBINE", ItemOptions::OPT_COMBINABLE}
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace sol
|
namespace sol
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue