Fixed some errors from the last refactor

This commit is contained in:
Pao
2023-02-03 14:39:46 +01:00
parent c19a586110
commit d8805cc6e2
7 changed files with 69 additions and 79 deletions

View File

@@ -1,12 +1,4 @@
-- TODO this needs to be moved away
function TocGetKitInInventory(surgeon)
local playerInv = surgeon:getInventory();
local item = playerInv:getItemFromType('TOC.Real_surgeon_kit') or playerInv:getItemFromType('TOC.Surgeon_kit') or
@@ -17,7 +9,7 @@ end
-- Unequip Prosthesis
local function PartNameToBodyLocationProsthesis(name)
function PartNameToBodyLocationProsthesis(name)
if name == "Right_Hand" then return "TOC_ArmRightProsthesis" end
if name == "Right_LowerArm" then return "TOC_ArmRightProsthesis" end
if name == "Right_UpperArm" then return "TOC_ArmRightProsthesis" end
@@ -26,7 +18,7 @@ local function PartNameToBodyLocationProsthesis(name)
if name == "Left_UpperArm" then return "TOC_ArmLeftProsthesis" end
end
local function PartNameToBodyLocationAmputation(name)
function PartNameToBodyLocationAmputation(name)
if name == "Right_Hand" then return "TOC_ArmRight" end
if name == "Right_LowerArm" then return "TOC_ArmRight" end
if name == "Right_UpperArm" then return "TOC_ArmRight" end
@@ -48,12 +40,6 @@ function TocFindItemInProstBodyLocation(part_name, patient)
end
-- Debug cheat and update every minute for cicatrization
function TocFindAmputationOrProsthesisName(part_name, player, choice)
local worn_items = player:getWornItems()
@@ -77,8 +63,12 @@ function TocFindAmputationOrProsthesisName(part_name, player, choice)
end
-------------------------------------
-- Override helper
-- Override and mod compat helper
function TocPopulateCanBeHeldTable(can_be_held, limbs_data)
for _, side in ipairs(TOC_sides) do