From d6d9ba7028b11784d823fdcd67ad86d0dc877a3b Mon Sep 17 00:00:00 2001 From: ZioPao Date: Sun, 5 Oct 2025 16:03:21 +0200 Subject: [PATCH] Bump to mod version --- .../lua/client/TOC/Handlers/ProsthesisHandler.lua | 11 ++++------- common/media/lua/client/TOC/Main.lua | 2 +- common/media/lua/shared/TOC/BodyLocations.lua | 1 - common/media/lua/shared/TOC/StaticData.lua | 12 ++++++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/common/media/lua/client/TOC/Handlers/ProsthesisHandler.lua b/common/media/lua/client/TOC/Handlers/ProsthesisHandler.lua index 6f1c49f..0ba1e3a 100644 --- a/common/media/lua/client/TOC/Handlers/ProsthesisHandler.lua +++ b/common/media/lua/client/TOC/Handlers/ProsthesisHandler.lua @@ -9,8 +9,8 @@ local OverridenMethodsArchive = require("TOC/OverridenMethodsArchive") ---@class ProsthesisHandler local ProsthesisHandler = {} -local bodyLocArmProst = StaticData.MOD_BODYLOCS_BASE_IND_STR.TOC_ArmProst -local bodyLocLegProst = StaticData.MOD_BODYLOCS_BASE_IND_STR.TOC_LegProst +local bodylocArmProstBaseline = "TOC_ArmProst" +--local bodyLocLegProst = "TOC_LegProst" ---Check if the following item is a prosthesis or not ---@param item InventoryItem? @@ -23,7 +23,7 @@ function ProsthesisHandler.CheckIfProst(item) return false end - return item:getBodyLocation():contains(bodyLocArmProst) + return item:getBodyLocation():contains(bodylocArmProstBaseline) end ---Get the grouping for the prosthesis @@ -33,13 +33,10 @@ function ProsthesisHandler.GetGroup(item) local fullType = item:getFullType() local side = CommonMethods.GetSide(fullType) - local bodyLocation = item:getBodyLocation() local position - if bodyLocation == bodyLocArmProst then + if bodyLocation:contains(bodylocArmProstBaseline) then position = "Top_" - elseif bodyLocation == bodyLocLegProst then - position = "Bottom_" else TOC_DEBUG.print("Something is wrong, no position in this item") position = nil diff --git a/common/media/lua/client/TOC/Main.lua b/common/media/lua/client/TOC/Main.lua index 07bcac6..4308f91 100644 --- a/common/media/lua/client/TOC/Main.lua +++ b/common/media/lua/client/TOC/Main.lua @@ -6,7 +6,7 @@ require("TOC/Events") ---@class Main local Main = { - _version = "2.1.6" + _version = "2.1.7" } function Main.Start() diff --git a/common/media/lua/shared/TOC/BodyLocations.lua b/common/media/lua/shared/TOC/BodyLocations.lua index 929b6fb..5c55c13 100644 --- a/common/media/lua/shared/TOC/BodyLocations.lua +++ b/common/media/lua/shared/TOC/BodyLocations.lua @@ -73,7 +73,6 @@ end BodyLocationsAPI.New("TOC_Arm_L") BodyLocationsAPI.New("TOC_Arm_R") -BodyLocationsAPI.New("TOC_Arm_LR") BodyLocationsAPI.New("TOC_ArmProst_L") BodyLocationsAPI.New("TOC_ArmProst_R") BodyLocationsAPI.New("TOC_ArmAccessory_L") diff --git a/common/media/lua/shared/TOC/StaticData.lua b/common/media/lua/shared/TOC/StaticData.lua index 152dbd7..fe181bc 100644 --- a/common/media/lua/shared/TOC/StaticData.lua +++ b/common/media/lua/shared/TOC/StaticData.lua @@ -49,11 +49,14 @@ StaticData.PARTS_STR = { "UpperArm" } - +-- TODO make it a bit more elegant StaticData.MOD_BODYLOCS_BASE_IND_STR = { - TOC_ArmProst = "TOC_ArmProst", - TOC_LegProst = "TOC_LegProst", - TOC_Arm = "TOC_Arm", + TOC_ArmProst_L = "TOC_ArmProst_L", + TOC_ArmProst_R = "TOC_ArmProst_R", + TOC_Arm_L = "TOC_Arm_L", + TOC_Arm_R = "TOC_Arm_R", + + --TOC_LegProst = "TOC_LegProst", } -- No "MAX" here. @@ -149,6 +152,7 @@ StaticData.AMP_GROUPS_BASE_IND_STR = { Bottom = "Bottom" } +-- FIX This should be aligned with the body locs, no reason anymore to keep it separated StaticData.AMP_GROUPS_IND_STR = {} StaticData.AMP_GROUPS_STR = {}