Even more renaming

This commit is contained in:
Pao
2023-02-28 02:18:25 +01:00
parent 15dea9f57a
commit 672a6c9aac
66 changed files with 189 additions and 247 deletions

View File

@@ -10,12 +10,8 @@ end
local function CheckIfStillInfected(limbsData)
if limbsData == nil then
local function TocCheckIfStillInfected(limbs_data)
if limbs_data == nil then
return return
end end
-- Check ALL body part types to check if the player is still gonna die -- Check ALL body part types to check if the player is still gonna die
@@ -23,54 +19,51 @@ local function TocCheckIfStillInfected(limbs_data)
for _, v in pairs(JCIO_Common.GetPartNames()) do for _, v in pairs(JCIO_Common.GetPartNames()) do
if limbs_data[v].is_infected then if limbsData[v].isInfected then
check = true check = true
end end
end end
if limbs_data.is_other_bodypart_infected then if limbsData.isOtherBodypartInfected then
check = true check = true
end end
return check return check
end end
local function TocCureInfection(body_damage, part_name) local function CureInfection(bodyDamage, partName)
local body_part_type = body_damage:getBodyPart(JCIO_Common.GetBodyPartFromPartName(part_name)) local bodyPartType = bodyDamage:getBodyPart(JCIO_Common.GetBodyPartFromPartName(partName))
body_damage:setInfected(false) bodyDamage:setInfected(false)
body_part_type:SetInfected(false) bodyPartType:SetInfected(false)
body_damage:setInfectionMortalityDuration(-1) bodyDamage:setInfectionMortalityDuration(-1)
body_damage:setInfectionTime(-1) bodyDamage:setInfectionTime(-1)
body_damage:setInfectionLevel(0) bodyDamage:setInfectionLevel(0)
local body_part_types = body_damage:getBodyParts() local bodypartTypesTable = bodyDamage:getBodyParts()
-- TODO I think this is enough... we should just cycle if with everything instead of that crap up there -- TODO I think this is enough... we should just cycle if with everything instead of that crap up there
for i = body_part_types:size() - 1, 0, -1 do for i = bodypartTypesTable:size() - 1, 0, -1 do
local bodyPart = body_part_types:get(i) local bodyPart = bodypartTypesTable:get(i)
bodyPart:SetInfected(false) bodyPart:SetInfected(false)
end end
if body_part_type:scratched() then body_part_type:setScratched(false, false) end if bodyPartType:scratched() then bodyPartType:setScratched(false, false) end
if body_part_type:haveGlass() then body_part_type:setHaveGlass(false) end if bodyPartType:haveGlass() then bodyPartType:setHaveGlass(false) end
if body_part_type:haveBullet() then body_part_type:setHaveBullet(false, 0) end if bodyPartType:haveBullet() then bodyPartType:setHaveBullet(false, 0) end
if body_part_type:isInfectedWound() then body_part_type:setInfectedWound(false) end if bodyPartType:isInfectedWound() then bodyPartType:setInfectedWound(false) end
if body_part_type:isBurnt() then body_part_type:setBurnTime(0) end if bodyPartType:isBurnt() then bodyPartType:setBurnTime(0) end
if body_part_type:isCut() then body_part_type:setCut(false, false) end --Lacerations if bodyPartType:isCut() then bodyPartType:setCut(false, false) end --Lacerations
if body_part_type:getFractureTime() > 0 then body_part_type:setFractureTime(0) end if bodyPartType:getFractureTime() > 0 then bodyPartType:setFractureTime(0) end
end end
local function TocDeleteOtherAmputatedLimbs(side) local function DeleteOtherAmputatedLimbs(side)
-- if left hand is cut and we cut left lowerarm, then delete hand -- if left hand is cut and we cut left lowerarm, then delete hand
for _, limb in pairs(JCIO.limbNames) do for _, limb in pairs(JCIO.limbNames) do
local part_name = "TOC.Amputation_" .. side .. "_" .. limb local partName = "JCIO.Amputation_" .. side .. "_" .. limb
local amputated_limb = getPlayer():getInventory():FindAndReturn(part_name) local amputatedLimbItem = getPlayer():getInventory():FindAndReturn(partName)
if amputated_limb then if amputatedLimbItem then
getPlayer():getInventory():Remove(amputated_limb) getPlayer():getInventory():Remove(amputatedLimbItem)
end end
end end
@@ -81,43 +74,43 @@ end
---@param perk any The perk to scale down ---@param perk any The perk to scale down
local function LosePerkLevel(player, perk) local function LosePerkLevel(player, perk)
player:LoseLevel(perk) player:LoseLevel(perk)
local actual_level = player:getPerkLevel(perk) local actualLevel = player:getPerkLevel(perk)
local perk_xp = player:getXp() local perkXp = player:getXp()
perk_xp:setXPToLevel(perk, actual_level) perkXp:setXPToLevel(perk, actualLevel)
SyncXp(player) SyncXp(player)
end end
---@param heal_bite boolean ---@param isHealingBite boolean
local function TocSetParametersForMissingLimb(body_part, heal_bite) local function SetParametersForMissingLimb(bodyPart, isHealingBite)
body_part:setBleeding(false) bodyPart:setBleeding(false)
body_part:setBleedingTime(0) bodyPart:setBleedingTime(0)
body_part:setDeepWounded(false) bodyPart:setDeepWounded(false)
body_part:setDeepWoundTime(0) bodyPart:setDeepWoundTime(0)
body_part:setScratched(false, false) -- why the fuck are there 2 booleans TIS? bodyPart:setScratched(false, false) -- why the fuck are there 2 booleans TIS?
body_part:setScratchTime(0) bodyPart:setScratchTime(0)
body_part:setCut(false) bodyPart:setCut(false)
body_part:setCutTime(0) bodyPart:setCutTime(0)
if heal_bite then if isHealingBite then
body_part:SetBitten(false) bodyPart:SetBitten(false)
body_part:setBiteTime(0) bodyPart:setBiteTime(0)
end end
end end
function TocDamagePlayerDuringAmputation(patient, part_name) function JCIO.DamagePlayerDuringAmputation(patient, partName)
-- Since we're cutting that specific part, it only makes sense that the bleeding starts from there. -- Since we're cutting that specific part, it only makes sense that the bleeding starts from there.
-- Then, we just delete the bleeding somewhere else before applying the other damage to to upper part of the limb -- Then, we just delete the bleeding somewhere else before applying the other damage to to upper part of the limb
local body_part_type = JCIO_Common.GetBodyPartFromPartName(part_name) local bodyPartType = JCIO_Common.GetBodyPartFromPartName(partName)
local body_damage = patient:getBodyDamage() local bodyDamage = patient:getBodyDamage()
local body_damage_part = body_damage:getBodyPart(body_part_type) local bodyDamagePart = bodyDamage:getBodyPart(bodyPartType)
body_damage_part:setBleeding(true) bodyDamagePart:setBleeding(true)
body_damage_part:setCut(true) bodyDamagePart:setCut(true)
body_damage_part:setBleedingTime(ZombRand(10, 20)) bodyDamagePart:setBleedingTime(ZombRand(10, 20))
end end
local function FindTourniquetInWornItems(patient, side) local function FindTourniquetInWornItems(patient, side)
@@ -171,7 +164,7 @@ JCIO.CutLimb = function(partName, surgeonFactor, bandageTable, painkillerTable)
-- Reset the status of the first body part, since we just cut it off it shouldn't be bleeding anymore -- Reset the status of the first body part, since we just cut it off it shouldn't be bleeding anymore
-- The bit will be checked later since we're not sure if the player is not infected from another wound -- The bit will be checked later since we're not sure if the player is not infected from another wound
TocSetParametersForMissingLimb(bodyPart, false) SetParametersForMissingLimb(bodyPart, false)
-- Use a tourniquet if available -- Use a tourniquet if available
local tourniquetItem = FindTourniquetInWornItems(player, JCIO_Common.GetSideFromPartName(partName)) local tourniquetItem = FindTourniquetInWornItems(player, JCIO_Common.GetSideFromPartName(partName))
@@ -232,7 +225,7 @@ JCIO.CutLimb = function(partName, surgeonFactor, bandageTable, painkillerTable)
local canHealDependedV = limbsData[depended_v].isInfected and local canHealDependedV = limbsData[depended_v].isInfected and
bodyDamage:getInfectionLevel() < 20 bodyDamage:getInfectionLevel() < 20
local depended_body_part = bodyDamage:getBodyPart(JCIO_Common.GetBodyPartFromPartName(depended_v)) local depended_body_part = bodyDamage:getBodyPart(JCIO_Common.GetBodyPartFromPartName(depended_v))
TocSetParametersForMissingLimb(depended_body_part, canHealDependedV) SetParametersForMissingLimb(depended_body_part, canHealDependedV)
if canHealDependedV then if canHealDependedV then
limbsData[depended_v].isInfected = false limbsData[depended_v].isInfected = false
@@ -253,8 +246,8 @@ JCIO.CutLimb = function(partName, surgeonFactor, bandageTable, painkillerTable)
bodyPart:setBiteTime(0) bodyPart:setBiteTime(0)
-- Second check, let's see if there is any other infected limb. -- Second check, let's see if there is any other infected limb.
if TocCheckIfStillInfected(limbsData) == false then if CheckIfStillInfected(limbsData) == false then
TocCureInfection(body_damage, partName) CureInfection(body_damage, partName)
getPlayer():Say("I'm gonna be fine...") -- TODO Make it visible to other players, check True Actions as reference getPlayer():Say("I'm gonna be fine...") -- TODO Make it visible to other players, check True Actions as reference
else else
getPlayer():Say("I'm still gonna die...") getPlayer():Say("I'm still gonna die...")
@@ -265,19 +258,19 @@ JCIO.CutLimb = function(partName, surgeonFactor, bandageTable, painkillerTable)
-- Check for older amputation models and deletes them from player's inventory -- Check for older amputation models and deletes them from player's inventory
local side = string.match(partName, '(%w+)_') local side = string.match(partName, '(%w+)_')
TocDeleteOtherAmputatedLimbs(side) DeleteOtherAmputatedLimbs(side)
--Equip new model for amputation --Equip new model for amputation
local amputation_clothing_item_name = JCIO_Common.FindAmputatedClothingName(partName) local amputation_clothing_item_name = JCIO_Common.FindAmputatedClothingName(partName)
print(amputation_clothing_item_name) print(amputation_clothing_item_name)
local amputation_clothing_item = player:getInventory():AddItem(amputation_clothing_item_name) local amputation_clothing_item = player:getInventory():AddItem(amputation_clothing_item_name)
TocSetCorrectTextureForAmputation(amputation_clothing_item, player, false) JCIO_Visuals.SetTextureForAmputation(amputation_clothing_item, player, false)
player:setWornItem(amputation_clothing_item:getBodyLocation(), amputation_clothing_item) player:setWornItem(amputation_clothing_item:getBodyLocation(), amputation_clothing_item)
-- Set blood on the amputated limb -- Set blood on the amputated limb
TocSetBloodOnAmputation(getPlayer(), adjacentBodyPart) JCIO_Visuals.SetBloodOnAmputation(getPlayer(), adjacentBodyPart)
if partName == "Left_Foot" or partName == "Right_Foot" then if partName == "Left_Foot" or partName == "Right_Foot" then
JCIO_Anims.SetMissingFootAnimation(true) JCIO_Anims.SetMissingFootAnimation(true)

View File

@@ -23,7 +23,7 @@ function JCIO_LocalActions.Operate(_, player, partName, useOven)
if useOven then if useOven then
ISTimedActionQueue.add(JCIO_OperateLimbAction:new(player, player, _, partName, useOven)); ISTimedActionQueue.add(JCIO_OperateLimbAction:new(player, player, _, partName, useOven));
else else
local kit = TocGetKitInInventory(player) local kit = JCIO_Common.GetKitInInventory(player)
if kit ~= nil then if kit ~= nil then
ISTimedActionQueue.add(JCIO_OperateLimbAction:new(player, player, kit, partName, false)) ISTimedActionQueue.add(JCIO_OperateLimbAction:new(player, player, kit, partName, false))
else else
@@ -32,6 +32,7 @@ function JCIO_LocalActions.Operate(_, player, partName, useOven)
end end
end end
-- TODO This is gonna get deleted
function JCIO_LocalActions.EquipProsthesis(_, player, partName) function JCIO_LocalActions.EquipProsthesis(_, player, partName)
local surgeonInv = player:getInventory() local surgeonInv = player:getInventory()
local prosthesisToEquip = surgeonInv:getItemFromType('TOC.MetalHand') or local prosthesisToEquip = surgeonInv:getItemFromType('TOC.MetalHand') or

View File

@@ -13,6 +13,7 @@ local mainUI, descUI, confirmUI, confirmUIMP
------------------------- -------------------------
-- MP stuff -- MP stuff
-- TODO Strip out all this crap and redo it
local function PrerenderFuncMP() local function PrerenderFuncMP()
local toSee = confirmUIMP local toSee = confirmUIMP
if confirmUIMP.responseReceive then if confirmUIMP.responseReceive then
@@ -40,37 +41,37 @@ end
local function GetImageName(partName, limbsData) local function GetImageName(partName, limbsData)
local name = "" local name = ""
local part_data = limbsData[partName] local partData = limbsData[partName]
if part_data.isCut and part_data.isCicatrized and part_data.isProsthesisEquipped then -- Cut and equip if partData.isCut and partData.isCicatrized and partData.isProsthesisEquipped then -- Cut and equip
if partName == "Right_Hand" or partName == "Left_Hand" then if partName == "Right_Hand" or partName == "Left_Hand" then
name = "media/ui/TOC/" .. partName .. "/Hook.png" name = "media/ui/JCIO/" .. partName .. "/Hook.png"
else else
name = "media/ui/TOC/" .. partName .. "/Prothesis.png" name = "media/ui/JCIO/" .. partName .. "/Prothesis.png"
end end
elseif part_data.isCut and part_data.isCicatrized and not part_data.isProsthesisEquipped and elseif partData.isCut and partData.isCicatrized and not partData.isProsthesisEquipped and
part_data.isAmputationShown then -- Cut and heal partData.isAmputationShown then -- Cut and heal
name = "media/ui/TOC/" .. partName .. "/Cut.png" name = "media/ui/JCIO/" .. partName .. "/Cut.png"
elseif part_data.isCut and not part_data.isCicatrized and part_data.isAmputationShown and elseif partData.isCut and not partData.isCicatrized and partData.isAmputationShown and
not part_data.isOperated then -- Cut not heal not partData.isOperated then -- Cut but not healead
name = "media/ui/TOC/" .. partName .. "/Bleed.png" name = "media/ui/JCIO/" .. partName .. "/Bleed.png"
elseif part_data.isCut and not part_data.isCicatrized and part_data.isAmputationShown and part_data.isOperated then -- Cut not heal elseif partData.isCut and not partData.isCicatrized and partData.isAmputationShown and partData.isOperated then -- Cut but not healed and operated
name = "media/ui/TOC/" .. partName .. "/Operate.png" name = "media/ui/JCIO/" .. partName .. "/Operate.png"
elseif part_data.isCut and not part_data.isAmputationShown then -- Empty (like hand if forearm cut) elseif partData.isCut and not partData.isAmputationShown then -- Empty (like hand if forearm cut)
name = "media/ui/TOC/Empty.png" name = "media/ui/JCIO/Empty.png"
elseif not part_data.isCut and elseif not partData.isCut and
-- FIXME This doesn't work in MP on another player since we're trying to retrieve bodyDamage from another player -- FIXME This doesn't work in MP on another player since we're trying to retrieve bodyDamage from another player
getPlayer():getBodyDamage():getBodyPart(JCIO_Common.GetBodyPartFromPartName(partName)):bitten() then -- Not cut but bitten getPlayer():getBodyDamage():getBodyPart(JCIO_Common.GetBodyPartFromPartName(partName)):bitten() then -- Not cut but bitten
name = "media/ui/TOC/" .. partName .. "/Bite.png" name = "media/ui/JCIO/" .. partName .. "/Bite.png"
else -- Not cut else -- Not cut
name = "media/ui/TOC/" .. partName .. "/Base.png" name = "media/ui/JCIO/" .. partName .. "/Base.png"
end end
-- If foreaerm equip, change hand -- If foreaerm equip, change hand
if partName == "Right_Hand" and limbsData["Right_LowerArm"].isProsthesisEquipped then if partName == "Right_Hand" and limbsData["Right_LowerArm"].isProsthesisEquipped then
name = "media/ui/TOC/" .. partName .. "/Hook.png" name = "media/ui/JCIO/" .. partName .. "/Hook.png"
elseif partName == "Left_Hand" and limbsData["Left_LowerArm"].isProsthesisEquipped then elseif partName == "Left_Hand" and limbsData["Left_LowerArm"].isProsthesisEquipped then
name = "media/ui/TOC/" .. partName .. "/Hook.png" name = "media/ui/JCIO/" .. partName .. "/Hook.png"
end end
return name return name
end end
@@ -149,7 +150,7 @@ JCIO_UI.SetupMainUI = function(surgeon, patient, limbsData)
if limbsData then if limbsData then
mainUI.limbs_data = limbsData mainUI.limbsData = limbsData
mainUI["b11"]:setPath(GetImageName("Right_UpperArm", limbsData)) mainUI["b11"]:setPath(GetImageName("Right_UpperArm", limbsData))
mainUI["b12"]:setPath(GetImageName("Left_UpperArm", limbsData)) mainUI["b12"]:setPath(GetImageName("Left_UpperArm", limbsData))
@@ -170,7 +171,7 @@ end
JCIO_UI.SetupDescUI = function(surgeon, patient, limbsData, partName) JCIO_UI.SetupDescUI = function(surgeon, patient, limbsData, partName)
descUI["textTitle"]:setText(getText("UI_ContextMenu_" .. partName)) descUI["textTitle"]:setText(getText("UI_ContextMenu_" .. partName))
descUI.part_name = partName descUI.partName = partName
descUI.surgeon = surgeon descUI.surgeon = surgeon
descUI.patient = patient descUI.patient = patient
@@ -289,34 +290,34 @@ end
------------------------------------------------ ------------------------------------------------
-- On Click Functions -- On Click Functions
local function OnClickTocMainUI(button, args) local function OnClickMainUI(button, args)
descUI:open() descUI:open()
descUI:setPositionPixel(mainUI:getRight(), mainUI:getY()) descUI:setPositionPixel(mainUI:getRight(), mainUI:getY())
JCIO_UI.SetupDescUI(mainUI.surgeon, mainUI.patient, mainUI.limbs_data, args.part_name) -- surgeon is generic. JCIO_UI.SetupDescUI(mainUI.surgeon, mainUI.patient, mainUI.limbsData, args.part_name) -- surgeon is generic.
end end
-- Generic TOC action, used in OnClickTocDescUI -- Generic JCIO action, used in OnClickDescUI
local function TryTocAction(_, part_name, action, surgeon, patient) local function TryJcioAction(_, partName, action, surgeon, patient)
-- TODO at this point surgeon doesnt do anything. We'll fix this later -- TODO at this point surgeon doesnt do anything. We'll fix this later
-- Check if SinglePlayer -- Check if SinglePlayer
if not isServer() and not isClient() then if not isServer() and not isClient() then
if action == "Cut" then if action == "Cut" then
JCIO_LocalActions.Cut(_, surgeon, part_name) JCIO_LocalActions.Cut(_, surgeon, partName)
elseif action == "Operate" then elseif action == "Operate" then
JCIO_LocalActions.Operate(_, surgeon, part_name, false) JCIO_LocalActions.Operate(_, surgeon, partName, false)
elseif action == "Equip" then elseif action == "Equip" then
JCIO_LocalActions.EquipProsthesis(_, surgeon, part_name) JCIO_LocalActions.EquipProsthesis(_, surgeon, partName)
elseif action == "Unequip" then elseif action == "Unequip" then
JCIO_LocalActions.UnequipProsthesis(_, surgeon, part_name) JCIO_LocalActions.UnequipProsthesis(_, surgeon, partName)
end end
else else
local ui = GetConfirmUIMP() local ui = GetConfirmUIMP()
if not ui then if not ui then
CreateTocConfirmUIMP() CreateConfirmUIMP()
ui = GetConfirmUIMP() ui = GetConfirmUIMP()
end end
@@ -326,17 +327,17 @@ local function TryTocAction(_, part_name, action, surgeon, patient)
if action == "Cut" then if action == "Cut" then
AskCanCutLimb(patient, part_name) AskCanCutLimb(patient, partName)
elseif action == "Operate" then elseif action == "Operate" then
AskCanOperateLimb(patient, part_name) AskCanOperateLimb(patient, partName)
elseif action == "Equip" then elseif action == "Equip" then
AskCanEquipProsthesis(patient, part_name) AskCanEquipProsthesis(patient, partName)
elseif action == "Unequip" then elseif action == "Unequip" then
AskCanUnequipProsthesis(patient, part_name) AskCanUnequipProsthesis(patient, partName)
end end
ui.actionAct = action ui.actionAct = action
ui.partNameAct = part_name ui.partNameAct = partName
ui.patient = patient ui.patient = patient
SendCommandToConfirmUIMP("Wait server") SendCommandToConfirmUIMP("Wait server")
@@ -345,35 +346,36 @@ local function TryTocAction(_, part_name, action, surgeon, patient)
end end
local function OnClickTocDescUI(button, args) local function OnClickDescUI(button, args)
-- Gets every arg from main -- Gets every arg from main
local patient = descUI.patient local patient = descUI.patient
local surgeon = descUI.surgeon local surgeon = descUI.surgeon
if args.option ~= "Nothing" then if args.option ~= "Nothing" then
TryTocAction(_, descUI.part_name, args.option, surgeon, patient) TryJcioAction(_, descUI.partName, args.option, surgeon, patient)
end end
mainUI:close() mainUI:close()
end end
local function OnClickTocConfirmUIMP(button, args) local function OnClickConfirmUIMP(button, args)
local player = getPlayer() local player = getPlayer()
if confirmUIMP.actionAct == "Cut" and args.option == "yes" then if confirmUIMP.actionAct == "Cut" and args.option == "yes" then
ISTimedActionQueue.add(JCIO_CutLimbAction:new(confirmUIMP.patient, player, confirmUIMP.partNameAct)) ISTimedActionQueue.add(JCIO_CutLimbAction:new(confirmUIMP.patient, player, confirmUIMP.partNameAct))
elseif confirmUIMP.actionAct == "Operate" and args.option == "yes" then elseif confirmUIMP.actionAct == "Operate" and args.option == "yes" then
local playerInv = player:getInventory() local kit = JCIO_Common.GetKitInInventory(player)
local item = playerInv:getItemFromType('TOC.Real_surgeon_kit') or playerInv:getItemFromType('TOC.Surgeon_kit') or if kit then
playerInv:getItemFromType('TOC.Improvised_surgeon_kit') ISTimedActionQueue.add(JCIO_OperateLimbAction:new(confirmUIMP.patient, player, kit, confirmUIMP.partNameAct,
if item then
ISTimedActionQueue.add(JCIO_OperateLimbAction:new(confirmUIMP.patient, player, item, confirmUIMP.partNameAct,
false)) false))
else else
player:Say("I need a kit") player:Say("I need a kit")
end end
elseif confirmUIMP.actionAct == "Equip" and args.option == "yes" then elseif confirmUIMP.actionAct == "Equip" and args.option == "yes" then
-- TODO Gonna be broken soon!
local surgeon_inventory = player:getInventory() local surgeon_inventory = player:getInventory()
local prosthesis_to_equip = surgeon_inventory:getItemFromType('TOC.MetalHand') or local prosthesis_to_equip = surgeon_inventory:getItemFromType('TOC.MetalHand') or
@@ -415,42 +417,42 @@ end
----------------------------------------------- -----------------------------------------------
-- CREATE UI SECTION -- CREATE UI SECTION
local function CreateTocMainUI() local function CreateMainUI()
mainUI = NewUI() mainUI = NewUI()
mainUI:setTitle("The Only Cure Menu") mainUI:setTitle("The Only Cure Menu")
mainUI:setWidthPercent(0.1) mainUI:setWidthPercent(0.1)
mainUI:addImageButton("b11", "", OnClickTocMainUI) mainUI:addImageButton("b11", "", OnClickMainUI)
mainUI["b11"]:addArg("part_name", "Right_UpperArm") mainUI["b11"]:addArg("part_name", "Right_UpperArm")
mainUI:addImageButton("b12", "", OnClickTocMainUI) mainUI:addImageButton("b12", "", OnClickMainUI)
mainUI["b12"]:addArg("part_name", "Left_UpperArm") mainUI["b12"]:addArg("part_name", "Left_UpperArm")
mainUI:nextLine() mainUI:nextLine()
mainUI:addImageButton("b21", "", OnClickTocMainUI) mainUI:addImageButton("b21", "", OnClickMainUI)
mainUI["b21"]:addArg("part_name", "Right_LowerArm") mainUI["b21"]:addArg("part_name", "Right_LowerArm")
mainUI:addImageButton("b22", "", OnClickTocMainUI) mainUI:addImageButton("b22", "", OnClickMainUI)
mainUI["b22"]:addArg("part_name", "Left_LowerArm") mainUI["b22"]:addArg("part_name", "Left_LowerArm")
mainUI:nextLine() mainUI:nextLine()
mainUI:addImageButton("b31", "", OnClickTocMainUI) mainUI:addImageButton("b31", "", OnClickMainUI)
mainUI["b31"]:addArg("part_name", "Right_Hand") mainUI["b31"]:addArg("part_name", "Right_Hand")
mainUI:addImageButton("b32", "", OnClickTocMainUI) mainUI:addImageButton("b32", "", OnClickMainUI)
mainUI["b32"]:addArg("part_name", "Left_Hand") mainUI["b32"]:addArg("part_name", "Left_Hand")
mainUI:nextLine() mainUI:nextLine()
mainUI:addImageButton("b41", "", OnClickTocMainUI) mainUI:addImageButton("b41", "", OnClickMainUI)
mainUI["b41"]:addArg("part_name", "Right_Foot") mainUI["b41"]:addArg("part_name", "Right_Foot")
mainUI:addImageButton("b42", "", OnClickTocMainUI) mainUI:addImageButton("b42", "", OnClickMainUI)
mainUI["b42"]:addArg("part_name", "Left_Foot") mainUI["b42"]:addArg("part_name", "Left_Foot")
mainUI:saveLayout() mainUI:saveLayout()
@@ -459,7 +461,7 @@ local function CreateTocMainUI()
end end
-- Create a temporary desc UI with fake data (for now) -- Create a temporary desc UI with fake data (for now)
local function CreateTocDescUI() local function CreateDescUI()
descUI = NewUI() descUI = NewUI()
descUI:setTitle("The only cure description"); descUI:setTitle("The only cure description");
descUI:isSubUIOf(mainUI) descUI:isSubUIOf(mainUI)
@@ -492,12 +494,12 @@ local function CreateTocDescUI()
descUI:addEmpty() descUI:addEmpty()
descUI:nextLine() descUI:nextLine()
descUI:addButton("b1", "Operate", OnClickTocDescUI) descUI:addButton("b1", "Operate", OnClickDescUI)
descUI:saveLayout() descUI:saveLayout()
end end
function CreateTocConfirmUIMP() function CreateConfirmUIMP()
confirmUIMP = NewUI() confirmUIMP = NewUI()
confirmUIMP.responseReceive = false confirmUIMP.responseReceive = false
@@ -519,10 +521,10 @@ function CreateTocConfirmUIMP()
confirmUIMP:nextLine(); confirmUIMP:nextLine();
confirmUIMP:addEmpty(); confirmUIMP:addEmpty();
confirmUIMP:addButton("b1", "Yes", OnClickTocConfirmUIMP); confirmUIMP:addButton("b1", "Yes", OnClickConfirmUIMP);
confirmUIMP.b1:addArg("option", "yes"); confirmUIMP.b1:addArg("option", "yes");
confirmUIMP:addEmpty(); confirmUIMP:addEmpty();
confirmUIMP:addButton("b2", "No", OnClickTocConfirmUIMP); confirmUIMP:addButton("b2", "No", OnClickConfirmUIMP);
confirmUIMP:addEmpty(); confirmUIMP:addEmpty();
confirmUIMP:nextLine(); confirmUIMP:nextLine();
@@ -537,11 +539,11 @@ end
-- We create everything from here -- We create everything from here
JCIO_UI.OnCreate = function() JCIO_UI.OnCreate = function()
CreateTocMainUI() CreateMainUI()
CreateTocDescUI() CreateDescUI()
CreateTocConfirmUIMP() CreateConfirmUIMP()
if isClient() then CreateTocConfirmUIMP() end if isClient() then CreateConfirmUIMP() end
mainUI:close() mainUI:close()
end end
@@ -578,7 +580,7 @@ function SendCommandToConfirmUIMP(action, isBitten, userName, partName)
end end
-------------------------------------------- --------------------------------------------
-- Add TOC element to Health Panel -- Add JCIO element to Health Panel
@@ -676,22 +678,22 @@ function ISHealthPanel:createChildren()
self.fitness:setWidth(self.fitness:getWidth() / 1.4) self.fitness:setWidth(self.fitness:getWidth() / 1.4)
self.TOCButton = ISButton:new(self.fitness:getRight() + 10, self.healthPanel.y, 60, 20, "", self, self.JCIOButton = ISButton:new(self.fitness:getRight() + 10, self.healthPanel.y, 60, 20, "", self,
ISNewHealthPanel.onClickJCIO) ISNewHealthPanel.onClickJCIO)
self.TOCButton:setImage(getTexture("media/ui/TOC/iconForMenu.png")) self.JCIOButton:setImage(getTexture("media/ui/JCIO/iconForMenu.png"))
self.TOCButton.anchorTop = false self.JCIOButton.anchorTop = false
self.TOCButton.anchorBottom = true self.JCIOButton.anchorBottom = true
self.TOCButton:initialise() self.JCIOButton:initialise()
self.TOCButton:instantiate() self.JCIOButton:instantiate()
self:addChild(self.TOCButton) self:addChild(self.JCIOButton)
if getCore():getGameMode() == "Tutorial" then if getCore():getGameMode() == "Tutorial" then
self.TOCButton:setVisible(false) self.JCIOButton:setVisible(false)
end end
end end
function ISHealthPanel:render() function ISHealthPanel:render()
ISHealthPanel_render(self); ISHealthPanel_render(self);
self.TOCButton:setY(self.fitness:getY()); self.JCIOButton:setY(self.fitness:getY());
end end
-- EVENTS -- EVENTS

View File

@@ -27,8 +27,8 @@ JCIO_Cheat.ResetEverything = function()
-- Destroy the amputation or prosthesis item -- Destroy the amputation or prosthesis item
for _, partName in pairs(JCIO_Common.GetPartNames()) do for _, partName in pairs(JCIO_Common.GetPartNames()) do
local amputationItemName = TocFindAmputationOrProsthesisName(partName, player, "Amputation") local amputationItemName = JCIO_Common.FindAmputationOrProsthesisName(partName, player, "Amputation")
local prostItemName = TocFindAmputationOrProsthesisName(partName, player, "Prosthesis") local prostItemName = JCIO_Common.FindAmputationOrProsthesisName(partName, player, "Prosthesis")
if amputationItemName ~= nil then if amputationItemName ~= nil then
local amputationItem = playerInv:FindAndReturn(amputationItemName) local amputationItem = playerInv:FindAndReturn(amputationItemName)
if amputationItem ~= nil then if amputationItem ~= nil then

View File

@@ -73,11 +73,11 @@ function GetProsthesisList()
end end
function JCIO_Common.FindAmputatedClothingName(partName) JCIO_Common.FindAmputatedClothingName = function(partName)
return "JCIO.Amputation_" .. partName return "JCIO.Amputation_" .. partName
end end
function JCIO_Common.GetPartNameFromBodyPartType(bodyPartType) JCIO_Common.GetPartNameFromBodyPartType = function(bodyPartType)
if bodyPartType == BodyPartType.Hand_R then if bodyPartType == BodyPartType.Hand_R then
return "Right_Hand" return "Right_Hand"
@@ -99,7 +99,7 @@ end
-- 1:1 map of part_name to BodyPartType -- 1:1 map of part_name to BodyPartType
function JCIO_Common.GetBodyPartFromPartName(partName) JCIO_Common.GetBodyPartFromPartName = function(partName)
if partName == "Right_Hand" then return BodyPartType.Hand_R end if partName == "Right_Hand" then return BodyPartType.Hand_R end
if partName == "Right_LowerArm" then return BodyPartType.ForeArm_R end if partName == "Right_LowerArm" then return BodyPartType.ForeArm_R end
if partName == "Right_UpperArm" then return BodyPartType.UpperArm_R end if partName == "Right_UpperArm" then return BodyPartType.UpperArm_R end
@@ -114,7 +114,7 @@ function JCIO_Common.GetBodyPartFromPartName(partName)
end end
-- Custom mapping to make more sense when cutting a limb -- Custom mapping to make more sense when cutting a limb
function JCIO_Common.GetAdjacentBodyPartFromPartName(partName) JCIO_Common.GetAdjacentBodyPartFromPartName = function(partName)
if partName == "Right_Hand" then return BodyPartType.ForeArm_R end if partName == "Right_Hand" then return BodyPartType.ForeArm_R end
if partName == "Right_LowerArm" then return BodyPartType.UpperArm_R end if partName == "Right_LowerArm" then return BodyPartType.UpperArm_R end
@@ -139,12 +139,12 @@ end
JCIO_Common.GetAmputationItemInInventory = function(player, partName) JCIO_Common.GetAmputationItemInInventory = function(player, partName)
local playerInv = player:getInventory() local playerInv = player:getInventory()
local amputationItemName = TocFindAmputationOrProsthesisName(partName, player, "Amputation") local amputationItemName = JCIO_Common.FindAmputationOrProsthesisName(partName, player, "Amputation")
local amputationItem = playerInv:FindAndReturn(amputationItemName) local amputationItem = playerInv:FindAndReturn(amputationItemName)
return amputationItem return amputationItem
end end
function JCIO_Common.GetSawInInventory(surgeon) JCIO_Common.GetSawInInventory = function(surgeon)
local playerInv = surgeon:getInventory() local playerInv = surgeon:getInventory()
local item = playerInv:getItemFromType("Saw") or playerInv:getItemFromType("GardenSaw") or local item = playerInv:getItemFromType("Saw") or playerInv:getItemFromType("GardenSaw") or
@@ -160,7 +160,7 @@ end
----------------------------------------- -----------------------------------------
-- MP HANDLING CHECKS -- MP HANDLING CHECKS
function JCIO_Common.CheckIfCanBeCut(partName, limbsData) JCIO_Common.CheckIfCanBeCut = function(partName, limbsData)
if limbsData == nil then if limbsData == nil then
limbsData = getPlayer():getModData().JCIO.limbs limbsData = getPlayer():getModData().JCIO.limbs
@@ -173,7 +173,7 @@ function JCIO_Common.CheckIfCanBeCut(partName, limbsData)
end end
function JCIO_Common.CheckIfCanBeOperated(partName, limbsData) JCIO_Common.CheckIfCanBeOperated = function(partName, limbsData)
if limbsData == nil then if limbsData == nil then
limbsData = getPlayer():getModData().JCIO.limbs limbsData = getPlayer():getModData().JCIO.limbs
@@ -183,13 +183,13 @@ function JCIO_Common.CheckIfCanBeOperated(partName, limbsData)
end end
function JCIO_Common.CheckIfProsthesisCanBeEquipped(partName) JCIO_Common.CheckIfProsthesisCanBeEquipped = function(partName)
local limbs_data = getPlayer():getModData().JCIO.limbs local limbs_data = getPlayer():getModData().JCIO.limbs
return limbs_data[partName].isCauterized or limbs_data[partName].isCicatrized return limbs_data[partName].isCauterized or limbs_data[partName].isCicatrized
-- check if prosthesis is in the surgeon inventory... we need to get it before -- check if prosthesis is in the surgeon inventory... we need to get it before
end end
function JCIO_Common.CheckIfProsthesisCanBeUnequipped(partName) JCIO_Common.CheckIfProsthesisCanBeUnequipped = function(partName)
-- TODO we should get item here to be sure that we can do this action instead of relying on some later checks -- TODO we should get item here to be sure that we can do this action instead of relying on some later checks
return true return true
@@ -201,7 +201,7 @@ end
-- Various checks -- Various checks
----------------------------------------- -----------------------------------------
function JCIO_Common.CheckIfItemIsAmputatedLimb(item) JCIO_Common.CheckIfItemIsAmputatedLimb = function(item)
local itemFullType = item:getFullType() local itemFullType = item:getFullType()
local check local check
@@ -232,7 +232,7 @@ function CheckIfItemIsProsthesis(item)
end end
function JCIO_Common.CheckIfItemIsInstalledProsthesis(item) JCIO_Common.CheckIfItemIsInstalledProsthesis = function(item)
local itemFullType = item:getFullType() local itemFullType = item:getFullType()
if string.find(itemFullType, "TOC.Prost_") then if string.find(itemFullType, "TOC.Prost_") then
return true return true
@@ -242,7 +242,7 @@ function JCIO_Common.CheckIfItemIsInstalledProsthesis(item)
end end
function JCIO_Common.CheckIfProsthesisAlreadyInstalled(limbsData, partName) JCIO_Common.CheckIfProsthesisAlreadyInstalled = function(limbsData, partName)
for _, side in pairs(JCIO.sideNames) do for _, side in pairs(JCIO.sideNames) do
if string.find(partName, side) then if string.find(partName, side) then
@@ -252,8 +252,7 @@ function JCIO_Common.CheckIfProsthesisAlreadyInstalled(limbsData, partName)
end end
JCIO_Common.GetCanBeHeldTable = function(limbs_data)
function JCIO_Common.GetCanBeHeldTable(limbs_data)
local canBeHeld = {} local canBeHeld = {}

View File

@@ -1,8 +1,8 @@
-- TODO this needs to be moved away -- TODO this needs to be moved away
function TocGetKitInInventory(surgeon) function JCIO_Common.GetKitInInventory(surgeon)
local playerInv = surgeon:getInventory(); local playerInv = surgeon:getInventory()
local item = playerInv:getItemFromType('TOC.Real_surgeon_kit') or playerInv:getItemFromType('TOC.Surgeon_kit') or local item = playerInv:getItemFromType('JCIO.Real_surgeon_kit') or playerInv:getItemFromType('JCIO.Surgeon_kit') or
playerInv:getItemFromType('TOC.Improvised_surgeon_kit') playerInv:getItemFromType('JCIO.Improvised_surgeon_kit')
return item return item
end end
@@ -30,12 +30,13 @@ local function PartNameToBodyLocationAmputation(name)
if name == "Right_Foot" then return "JCIO_LegRight" end if name == "Right_Foot" then return "JCIO_LegRight" end
end end
function TocFindItemInProstBodyLocation(partName, patient) function JCIO_Common.FindItemInProstBodyLocation(partName, patient)
-- Can't be used for online purposes, since we can't get the online inventory of another player -- Can't be used for online purposes, since we can't get the online inventory of another player
local worn_items = patient:getWornItems() local wornItems = patient:getWornItems()
for i = 1, worn_items:size() - 1 do -- Maybe wornItems:size()-1 -- Particular case where i= 1 and size - 1 I guess?
local item = worn_items:get(i):getItem() for i = 1, wornItems:size() - 1 do
local item = wornItems:get(i):getItem()
if item:getBodyLocation() == PartNameToBodyLocationProsthesis(partName) then if item:getBodyLocation() == PartNameToBodyLocationProsthesis(partName) then
return item return item
end end
@@ -44,10 +45,10 @@ function TocFindItemInProstBodyLocation(partName, patient)
end end
-- Debug cheat and update every minute for cicatrization -- Debug cheat and update every minute for cicatrization
function TocFindAmputationOrProsthesisName(partName, player, choice) function JCIO_Common.FindAmputationOrProsthesisName(partName, player, choice)
local worn_items = player:getWornItems() local wornItems = player:getWornItems()
for i = 1, worn_items:size() - 1 do for i = 1, wornItems:size() - 1 do
local item = worn_items:get(i):getItem() local item = wornItems:get(i):getItem()
if choice == "Amputation" then if choice == "Amputation" then

View File

@@ -73,7 +73,7 @@ JCIO.InitPart = function(limbs_data, part_name)
end end
JCIO.SetInitData = function(modData, player) JCIO.SetInitData = function(modData, player)
print("JCIO: Creating mod_data.TOC") print("JCIO: Creating mod_data.JCIO")
-------- --------
-- NEW NAMING SCHEME -- NEW NAMING SCHEME

View File

@@ -70,9 +70,9 @@ function GenerateEquippedProsthesis(prosthesis_item, inventory, limb)
-- Check the item mod data if the values are different than the default values -- Check the item mod data if the values are different than the default values
if item_mod_data.TOC ~= nil then if item_mod_data.JCIO ~= nil then
durability_base = item_mod_data.base_durability durability_base = item_mod_data.baseDurability
durability_top = item_mod_data.top_durability durability_top = item_mod_data.topDurability
-- else -- else
-- durability_base, speed_base = GetProsthesisStats(base_table, prosthesis_name) -- durability_base, speed_base = GetProsthesisStats(base_table, prosthesis_name)
-- durability_top, speed_top = GetProsthesisStats(top_table, prosthesis_name) -- durability_top, speed_top = GetProsthesisStats(top_table, prosthesis_name)
@@ -127,45 +127,45 @@ function ProsthesisRecipes.OnCreateProsthesis(items, result, player, selectedIte
result:setCondition(condition) -- Should be the sum? result:setCondition(condition) -- Should be the sum?
result:getModData().TOC = { result:getModData().JCIO = {
base_durability = 100, baseDurability = 100,
top_durability = 100, -- Stores it here too so we can re-reference it for later topDurability = 100, -- Stores it here too so we can re-reference it for later
} }
end end
-- Reassign the correct condition to each item -- Reassign the correct condition to each item
function ProsthesisRecipes.OnDisassembleProsthesis(item, result_items, player, selectedItem) function ProsthesisRecipes.OnDisassembleProsthesis(item, resultItems, player, selectedItem)
-- Check durability of original item -- Check durability of original item
local item_mod_data = item.getModData().TOC local itemModData = item.getModData().JCIO
local durability_top = item_mod_data.top.durability local durabilityTop = itemModData.top.durability
local durability_base = item_mod_data.base.durability local durabilityBase = itemModData.base.durability
-- TODO do we actually need to store speed again? -- TODO do we actually need to store speed again?
local speed_top = item_mod_data.top.speed local speedTop = itemModData.top.speed
local speed_base = item_mod_data.base.speed local speedBase = itemModData.base.speed
-- Check name of the item -- Check name of the item
local prosthesis_item_name = item:getFullType() local prosthesisItemName = item:getFullType()
local base_name = GetProsthesisPartName(base_table, prosthesis_item_name) local baseName = GetProsthesisPartName(base_table, prosthesisItemName)
local top_name = GetProsthesisPartName(top_table, prosthesis_item_name) local topName = GetProsthesisPartName(top_table, prosthesisItemName)
print("JCIO: " .. base_name .. " and " .. top_name) print("JCIO: " .. baseName .. " and " .. topName)
local player_inv = player:getInventory() local playerInv = player:getInventory()
local part_base = player_inv:AddItem("JCIO.ProstPart" .. base_name) local partBase = playerInv:AddItem("JCIO.ProstPart" .. baseName)
part_base:setCondition(durability_base) partBase:setCondition(durabilityBase)
local part_top = player_inv:AddItem("JCIO.ProstPart" .. top_name) local partTop = playerInv:AddItem("JCIO.ProstPart" .. topName)
part_top:setCondition(durability_top) partTop:setCondition(durabilityTop)
-- TODO Add Screws from the item back with a chance of them breaking -- TODO Add Screws from the item back with a chance of them breaking

View File

@@ -129,7 +129,7 @@ end
ServerCommands.AcceptDamageOtherPlayer = function(arg) ServerCommands.AcceptDamageOtherPlayer = function(arg)
local patient = getPlayerByOnlineID(arg[1]) local patient = getPlayerByOnlineID(arg[1])
local part_name = arg[2] local part_name = arg[2]
TocDamagePlayerDuringAmputation(patient, part_name) JCIO.DamagePlayerDuringAmputation(patient, part_name)
end end
-- Used to propagate animation changes after amputating a foot -- Used to propagate animation changes after amputating a foot

View File

@@ -78,10 +78,10 @@ function TocTestBodyLocations()
end end
end end
function TocTestItem() function JCIOTestItem()
local player = getPlayer() local player = getPlayer()
local player_inventory = player:getInventory() local player_inventory = player:getInventory()
local item_name = "TOC.Amputation_" .. "Right" .. "_" .. "Hand" local item_name = "JCIO.Amputation_" .. "Right" .. "_" .. "Hand"
local found_item = player_inventory:FindAndReturn(item_name) local found_item = player_inventory:FindAndReturn(item_name)
print(found_item:getID()) print(found_item:getID())

View File

@@ -128,7 +128,7 @@ local function SetHealthStatusForBodyPart(partData, partName, player)
if partData[partName].cicatrizationTime < 0 then if partData[partName].cicatrizationTime < 0 then
partData[partName].isCicatrized = true partData[partName].isCicatrized = true
local playerInv = player:getInventory() local playerInv = player:getInventory()
local amputatedClothingItemName = TocFindAmputationOrProsthesisName(partName, player, "Amputation") local amputatedClothingItemName = JCIO_Common.FindAmputationOrProsthesisName(partName, player, "Amputation")
local amputatedClothingItem = playerInv:FindAndReturn(amputatedClothingItemName) local amputatedClothingItem = playerInv:FindAndReturn(amputatedClothingItemName)
player:removeWornItem(amputatedClothingItem) player:removeWornItem(amputatedClothingItem)
@@ -170,10 +170,8 @@ JCIO.UpdateOnTick = function()
return return
end end
--local toc_data = player:getModData().TOC
local jcioModData = player:getModData().JCIO local jcioModData = player:getModData().JCIO
if jcioModData ~= nil then if jcioModData ~= nil then
CheckIfPlayerIsInfected(player, jcioModData.limbs) CheckIfPlayerIsInfected(player, jcioModData.limbs)
UpdatePlayerHealth(player, jcioModData.limbs) UpdatePlayerHealth(player, jcioModData.limbs)
@@ -239,7 +237,7 @@ JCIO.UpdateEveryOneMinute = function()
-- Updates toc data in a global way, basically player:transmitModData but it works -- Updates JCIO data in a global way, basically player:transmitModData but it works
-- Sends only Limbs since the other stuff is mostly static -- Sends only Limbs since the other stuff is mostly static
if jcioModData ~= nil then if jcioModData ~= nil then
-- FIXME Send little packets instead of the whole thing? -- FIXME Send little packets instead of the whole thing?

View File

@@ -58,55 +58,3 @@ JCIO_Visuals.SetBloodOnAmputation = function(player, bodyPart)
player:addBlood(bloodBodyPartType, false, true, false) player:addBlood(bloodBodyPartType, false, true, false)
player:addBlood(BloodBodyPartType.Torso_Lower, false, true, false) player:addBlood(BloodBodyPartType.Torso_Lower, false, true, false)
end end
function TocSetCorrectTextureForAmputation(item, player, cicatrized)
local human_visual = player:getHumanVisual()
local texture_string = human_visual:getSkinTexture()
local is_hairy = string.find(texture_string, "a$")
-- Hairy bodies
if is_hairy then
texture_string = texture_string:sub(1, -2) -- Removes b at the end to make it compatible
end
local matched_index = string.match(texture_string, "%d$")
if is_hairy then
matched_index = matched_index + 5
end
if cicatrized then
if is_hairy then
matched_index = matched_index + 5 -- to use the cicatrized texture on hairy bodies
else
matched_index = matched_index + 10 -- cicatrized texture only, no hairs
end
end
--print("JCIO: Setting texture " .. matched_index)
item:getVisual():setTextureChoice(tonumber(matched_index - 1)) -- it counts from 0, so we have to subtract 1
end
function TocSetBloodOnAmputation(player, body_part)
local body_part_type = body_part:getType()
local blood_body_part_type
if body_part_type == BodyPartType.Hand_R then
blood_body_part_type = BloodBodyPartType.ForeArm_R
elseif body_part_type == BodyPartType.Hand_L then
blood_body_part_type = BloodBodyPartType.ForeArm_L
elseif body_part_type == BodyPartType.Forearm_L or body_part_type == BodyPartType.UpperArm_L then
blood_body_part_type = BloodBodyPartType.UpperArm_L
elseif body_part_type == BodyPartType.Forearm_R or body_part_type == BodyPartType.UpperArm_R then
blood_body_part_type = BloodBodyPartType.UpperArm_R
end
--print("JCIO: Adding blood based on " .. tostring(body_part_type))
player:addBlood(blood_body_part_type, false, true, false)
player:addBlood(BloodBodyPartType.Torso_Lower, false, true, false)
end

View File

@@ -61,7 +61,7 @@ function JCIO_CutLimbAction:start()
end end
if self.patient == self.surgeon then if self.patient == self.surgeon then
TocDamagePlayerDuringAmputation(self.patient, self.partName) JCIO.DamagePlayerDuringAmputation(self.patient, self.partName)
else else
sendClientCommand(self.surgeon, "JCIO", "AskDamageOtherPlayer", {self.patient:getOnlineID(), self.partName}) sendClientCommand(self.surgeon, "JCIO", "AskDamageOtherPlayer", {self.patient:getOnlineID(), self.partName})
end end

View File

@@ -65,7 +65,7 @@ function JCIO_UninstallProsthesisAction:new(surgeon, patient, partName)
local limbsData = patient:getModData().JCIO.limbs local limbsData = patient:getModData().JCIO.limbs
o.item = TocFindItemInProstBodyLocation(partName, patient) o.item = JCIO_Common.FindItemInProstBodyLocation(partName, patient)
o.character = surgeon -- For animation purposes o.character = surgeon -- For animation purposes
o.patient = patient o.patient = patient

View File

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 137 B

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 671 B

After

Width:  |  Height:  |  Size: 671 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 381 B

After

Width:  |  Height:  |  Size: 381 B

View File

Before

Width:  |  Height:  |  Size: 683 B

After

Width:  |  Height:  |  Size: 683 B

View File

Before

Width:  |  Height:  |  Size: 724 B

After

Width:  |  Height:  |  Size: 724 B

View File

Before

Width:  |  Height:  |  Size: 843 B

After

Width:  |  Height:  |  Size: 843 B

View File

Before

Width:  |  Height:  |  Size: 641 B

After

Width:  |  Height:  |  Size: 641 B

View File

Before

Width:  |  Height:  |  Size: 671 B

After

Width:  |  Height:  |  Size: 671 B

View File

Before

Width:  |  Height:  |  Size: 512 B

After

Width:  |  Height:  |  Size: 512 B

View File

Before

Width:  |  Height:  |  Size: 298 B

After

Width:  |  Height:  |  Size: 298 B

View File

Before

Width:  |  Height:  |  Size: 683 B

After

Width:  |  Height:  |  Size: 683 B

View File

Before

Width:  |  Height:  |  Size: 724 B

After

Width:  |  Height:  |  Size: 724 B

View File

Before

Width:  |  Height:  |  Size: 444 B

After

Width:  |  Height:  |  Size: 444 B

View File

Before

Width:  |  Height:  |  Size: 677 B

After

Width:  |  Height:  |  Size: 677 B

View File

Before

Width:  |  Height:  |  Size: 704 B

After

Width:  |  Height:  |  Size: 704 B

View File

Before

Width:  |  Height:  |  Size: 617 B

After

Width:  |  Height:  |  Size: 617 B

View File

Before

Width:  |  Height:  |  Size: 393 B

After

Width:  |  Height:  |  Size: 393 B

View File

Before

Width:  |  Height:  |  Size: 541 B

After

Width:  |  Height:  |  Size: 541 B

View File

Before

Width:  |  Height:  |  Size: 855 B

After

Width:  |  Height:  |  Size: 855 B

View File

Before

Width:  |  Height:  |  Size: 513 B

After

Width:  |  Height:  |  Size: 513 B

View File

Before

Width:  |  Height:  |  Size: 552 B

After

Width:  |  Height:  |  Size: 552 B

View File

Before

Width:  |  Height:  |  Size: 893 B

After

Width:  |  Height:  |  Size: 893 B

View File

Before

Width:  |  Height:  |  Size: 781 B

After

Width:  |  Height:  |  Size: 781 B

View File

Before

Width:  |  Height:  |  Size: 842 B

After

Width:  |  Height:  |  Size: 842 B

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 671 B

After

Width:  |  Height:  |  Size: 671 B

View File

Before

Width:  |  Height:  |  Size: 981 B

After

Width:  |  Height:  |  Size: 981 B

View File

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 282 B

View File

Before

Width:  |  Height:  |  Size: 683 B

After

Width:  |  Height:  |  Size: 683 B

View File

Before

Width:  |  Height:  |  Size: 724 B

After

Width:  |  Height:  |  Size: 724 B

View File

Before

Width:  |  Height:  |  Size: 680 B

After

Width:  |  Height:  |  Size: 680 B

View File

Before

Width:  |  Height:  |  Size: 658 B

After

Width:  |  Height:  |  Size: 658 B

View File

Before

Width:  |  Height:  |  Size: 683 B

After

Width:  |  Height:  |  Size: 683 B

View File

Before

Width:  |  Height:  |  Size: 521 B

After

Width:  |  Height:  |  Size: 521 B

View File

Before

Width:  |  Height:  |  Size: 302 B

After

Width:  |  Height:  |  Size: 302 B

View File

Before

Width:  |  Height:  |  Size: 692 B

After

Width:  |  Height:  |  Size: 692 B

View File

Before

Width:  |  Height:  |  Size: 723 B

After

Width:  |  Height:  |  Size: 723 B

View File

Before

Width:  |  Height:  |  Size: 445 B

After

Width:  |  Height:  |  Size: 445 B

View File

Before

Width:  |  Height:  |  Size: 668 B

After

Width:  |  Height:  |  Size: 668 B

View File

Before

Width:  |  Height:  |  Size: 691 B

After

Width:  |  Height:  |  Size: 691 B

View File

Before

Width:  |  Height:  |  Size: 607 B

After

Width:  |  Height:  |  Size: 607 B

View File

Before

Width:  |  Height:  |  Size: 389 B

After

Width:  |  Height:  |  Size: 389 B

View File

Before

Width:  |  Height:  |  Size: 546 B

After

Width:  |  Height:  |  Size: 546 B

View File

Before

Width:  |  Height:  |  Size: 864 B

After

Width:  |  Height:  |  Size: 864 B

View File

Before

Width:  |  Height:  |  Size: 516 B

After

Width:  |  Height:  |  Size: 516 B

View File

Before

Width:  |  Height:  |  Size: 557 B

After

Width:  |  Height:  |  Size: 557 B

View File

Before

Width:  |  Height:  |  Size: 888 B

After

Width:  |  Height:  |  Size: 888 B

View File

Before

Width:  |  Height:  |  Size: 771 B

After

Width:  |  Height:  |  Size: 771 B

View File

Before

Width:  |  Height:  |  Size: 838 B

After

Width:  |  Height:  |  Size: 838 B

View File

Before

Width:  |  Height:  |  Size: 885 B

After

Width:  |  Height:  |  Size: 885 B