From 97b867edf40f913fae2e05ca60f50c6cbdbc6e2c Mon Sep 17 00:00:00 2001 From: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Date: Sun, 27 Nov 2022 21:43:32 +0000 Subject: [PATCH] Fixed Combine ingame stage 1 Works only if the player does not save /load with only one piece as both are not remembered. --- .../Internal/TEN/Flow/InventoryItem/InventoryItem.cpp | 6 ++---- .../Internal/TEN/Flow/InventoryItem/InventoryItem.h | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/TombEngine/Scripting/Internal/TEN/Flow/InventoryItem/InventoryItem.cpp b/TombEngine/Scripting/Internal/TEN/Flow/InventoryItem/InventoryItem.cpp index 250ad7040..77392c02b 100644 --- a/TombEngine/Scripting/Internal/TEN/Flow/InventoryItem/InventoryItem.cpp +++ b/TombEngine/Scripting/Internal/TEN/Flow/InventoryItem/InventoryItem.cpp @@ -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?
+ @tparam ItemAction action is this usable, equippable, combineable or examinable?
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))) { diff --git a/TombEngine/Scripting/Internal/TEN/Flow/InventoryItem/InventoryItem.h b/TombEngine/Scripting/Internal/TEN/Flow/InventoryItem/InventoryItem.h index c40f99ab3..3eb555857 100644 --- a/TombEngine/Scripting/Internal/TEN/Flow/InventoryItem/InventoryItem.h +++ b/TombEngine/Scripting/Internal/TEN/Flow/InventoryItem/InventoryItem.h @@ -19,7 +19,8 @@ static const std::unordered_map kItemActions { {"USE", ItemOptions::OPT_USE}, {"EQUIP", ItemOptions::OPT_EQUIP}, - {"EXAMINE", ItemOptions::OPT_EXAMINABLE} + {"EXAMINE", ItemOptions::OPT_EXAMINABLE}, + {"COMBINE", ItemOptions::OPT_COMBINABLE} }; namespace sol