Let's switch back to the OG name
@@ -1,4 +1,4 @@
|
||||
# JUST CUT IT OUT
|
||||
# THE ONLY CURE
|
||||
```
|
||||
Workshop ID: 2915572347
|
||||
Mod ID: Amputation2
|
||||
|
||||
@@ -169,7 +169,7 @@ df_top = read_table(excel_path, "TopTable")
|
||||
|
||||
limbs = ["Hand", "LowerArm"]
|
||||
sides = ["Left", "Right"]
|
||||
prost_bodylocations = ["JCIO_ArmRightProsthesis", "JCIO_ArmLeftProsthesis"]
|
||||
prost_bodylocations = ["TOC_ArmRightProsthesis", "TOC_ArmLeftProsthesis"]
|
||||
texture_types = ["Wooden", "Metal"]
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ item Prost_WoodenBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Wooden Hook,
|
||||
ClothingItem = Prost_Left_Hand_WoodenBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -18,7 +18,7 @@ item Prost_WoodenBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Wooden Hook,
|
||||
ClothingItem = Prost_Right_Hand_WoodenBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -31,7 +31,7 @@ item Prost_WoodenBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Wooden Hook,
|
||||
ClothingItem = Prost_Left_LowerArm_WoodenBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -44,7 +44,7 @@ item Prost_WoodenBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Wooden Hook,
|
||||
ClothingItem = Prost_Right_LowerArm_WoodenBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -57,7 +57,7 @@ item Prost_WoodenBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Metal Hook,
|
||||
ClothingItem = Prost_Left_Hand_WoodenBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -70,7 +70,7 @@ item Prost_WoodenBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Metal Hook,
|
||||
ClothingItem = Prost_Right_Hand_WoodenBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -83,7 +83,7 @@ item Prost_WoodenBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Metal Hook,
|
||||
ClothingItem = Prost_Left_LowerArm_WoodenBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -96,7 +96,7 @@ item Prost_WoodenBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Metal Hook,
|
||||
ClothingItem = Prost_Right_LowerArm_WoodenBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -109,7 +109,7 @@ item Prost_WoodenBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Metal Hand,
|
||||
ClothingItem = Prost_Left_Hand_WoodenBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -122,7 +122,7 @@ item Prost_WoodenBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Metal Hand,
|
||||
ClothingItem = Prost_Right_Hand_WoodenBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -135,7 +135,7 @@ item Prost_WoodenBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Metal Hand,
|
||||
ClothingItem = Prost_Left_LowerArm_WoodenBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -148,7 +148,7 @@ item Prost_WoodenBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Metal Hand,
|
||||
ClothingItem = Prost_Right_LowerArm_WoodenBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -161,7 +161,7 @@ item Prost_MetalBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Wooden Hook,
|
||||
ClothingItem = Prost_Left_Hand_MetalBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -174,7 +174,7 @@ item Prost_MetalBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Wooden Hook,
|
||||
ClothingItem = Prost_Right_Hand_MetalBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -187,7 +187,7 @@ item Prost_MetalBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Wooden Hook,
|
||||
ClothingItem = Prost_Left_LowerArm_MetalBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -200,7 +200,7 @@ item Prost_MetalBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Wooden Hook,
|
||||
ClothingItem = Prost_Right_LowerArm_MetalBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -213,7 +213,7 @@ item Prost_MetalBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Metal Hook,
|
||||
ClothingItem = Prost_Left_Hand_MetalBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -226,7 +226,7 @@ item Prost_MetalBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Metal Hook,
|
||||
ClothingItem = Prost_Right_Hand_MetalBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -239,7 +239,7 @@ item Prost_MetalBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Metal Hook,
|
||||
ClothingItem = Prost_Left_LowerArm_MetalBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -252,7 +252,7 @@ item Prost_MetalBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Metal Hook,
|
||||
ClothingItem = Prost_Right_LowerArm_MetalBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -265,7 +265,7 @@ item Prost_MetalBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Metal Hand,
|
||||
ClothingItem = Prost_Left_Hand_MetalBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -278,7 +278,7 @@ item Prost_MetalBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Metal Hand,
|
||||
ClothingItem = Prost_Right_Hand_MetalBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -291,7 +291,7 @@ item Prost_MetalBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Metal Hand,
|
||||
ClothingItem = Prost_Left_LowerArm_MetalBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -304,7 +304,7 @@ item Prost_MetalBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Metal Hand,
|
||||
ClothingItem = Prost_Right_LowerArm_MetalBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -317,7 +317,7 @@ item Prost_LeatherBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Wooden Hook,
|
||||
ClothingItem = Prost_Left_Hand_LeatherBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -330,7 +330,7 @@ item Prost_LeatherBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Wooden Hook,
|
||||
ClothingItem = Prost_Right_Hand_LeatherBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -343,7 +343,7 @@ item Prost_LeatherBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Wooden Hook,
|
||||
ClothingItem = Prost_Left_LowerArm_LeatherBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -356,7 +356,7 @@ item Prost_LeatherBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Wooden Hook,
|
||||
ClothingItem = Prost_Right_LowerArm_LeatherBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -369,7 +369,7 @@ item Prost_LeatherBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Metal Hook,
|
||||
ClothingItem = Prost_Left_Hand_LeatherBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -382,7 +382,7 @@ item Prost_LeatherBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Metal Hook,
|
||||
ClothingItem = Prost_Right_Hand_LeatherBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -395,7 +395,7 @@ item Prost_LeatherBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Metal Hook,
|
||||
ClothingItem = Prost_Left_LowerArm_LeatherBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -408,7 +408,7 @@ item Prost_LeatherBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Metal Hook,
|
||||
ClothingItem = Prost_Right_LowerArm_LeatherBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -421,7 +421,7 @@ item Prost_LeatherBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Metal Hand,
|
||||
ClothingItem = Prost_Left_Hand_LeatherBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -434,7 +434,7 @@ item Prost_LeatherBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Metal Hand,
|
||||
ClothingItem = Prost_Right_Hand_LeatherBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -447,7 +447,7 @@ item Prost_LeatherBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Metal Hand,
|
||||
ClothingItem = Prost_Left_LowerArm_LeatherBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -460,7 +460,7 @@ item Prost_LeatherBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Metal Hand,
|
||||
ClothingItem = Prost_Right_LowerArm_LeatherBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
------------------------------------------
|
||||
------------- JUST CUT IT OUT ------------
|
||||
-------------- THE ONLY CURE -------------
|
||||
------------------------------------------
|
||||
----------- CUT LIMB FUNCTIONS -----------
|
||||
|
||||
-- Seems to be the first file loaded, so let's add this
|
||||
if JCIO == nil then
|
||||
JCIO = {}
|
||||
if TOC == nil then
|
||||
TOC = {}
|
||||
end
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ local function CheckIfStillInfected(limbsData)
|
||||
local check = false
|
||||
|
||||
|
||||
for _, v in pairs(JCIO_Common.GetPartNames()) do
|
||||
for _, v in pairs(TOC_Common.GetPartNames()) do
|
||||
if limbsData[v].isInfected then
|
||||
check = true
|
||||
end
|
||||
@@ -33,7 +33,7 @@ end
|
||||
|
||||
local function CureInfection(bodyDamage, partName)
|
||||
|
||||
local bodyPartType = bodyDamage:getBodyPart(JCIO_Common.GetBodyPartFromPartName(partName))
|
||||
local bodyPartType = bodyDamage:getBodyPart(TOC_Common.GetBodyPartFromPartName(partName))
|
||||
|
||||
bodyDamage:setInfected(false)
|
||||
bodyPartType:SetInfected(false)
|
||||
@@ -59,8 +59,8 @@ end
|
||||
|
||||
local function DeleteOtherAmputatedLimbs(side)
|
||||
-- if left hand is cut and we cut left lowerarm, then delete hand
|
||||
for _, limb in pairs(JCIO.limbNames) do
|
||||
local partName = "JCIO.Amputation_" .. side .. "_" .. limb
|
||||
for _, limb in pairs(TOC.limbNames) do
|
||||
local partName = "TOC.Amputation_" .. side .. "_" .. limb
|
||||
local amputatedLimbItem = getPlayer():getInventory():FindAndReturn(partName)
|
||||
if amputatedLimbItem then
|
||||
getPlayer():getInventory():Remove(amputatedLimbItem)
|
||||
@@ -99,11 +99,11 @@ local function SetParametersForMissingLimb(bodyPart, isHealingBite)
|
||||
|
||||
end
|
||||
|
||||
function JCIO.DamagePlayerDuringAmputation(patient, partName)
|
||||
function TOC.DamagePlayerDuringAmputation(patient, partName)
|
||||
|
||||
-- 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
|
||||
local bodyPartType = JCIO_Common.GetBodyPartFromPartName(partName)
|
||||
local bodyPartType = TOC_Common.GetBodyPartFromPartName(partName)
|
||||
local bodyDamage = patient:getBodyDamage()
|
||||
local bodyDamagePart = bodyDamage:getBodyPart(bodyPartType)
|
||||
|
||||
@@ -116,14 +116,14 @@ end
|
||||
local function FindTourniquetInWornItems(patient, side)
|
||||
|
||||
local checkString = "Surgery_" .. side .. "_Tourniquet"
|
||||
local item = JCIO_Common.FindItemInWornItems(patient, checkString)
|
||||
local item = TOC_Common.FindItemInWornItems(patient, checkString)
|
||||
return item
|
||||
|
||||
end
|
||||
|
||||
local function FindWristWatchInWornItems(patient, side)
|
||||
local checkString = "Watch_" .. side
|
||||
local item = JCIO_Common.FindItemInWornItems(patient, checkString)
|
||||
local item = TOC_Common.FindItemInWornItems(patient, checkString)
|
||||
return item
|
||||
|
||||
end
|
||||
@@ -139,27 +139,27 @@ end
|
||||
---@param surgeonFactor any the surgeon factor, which will determine some stats for the inflicted wound
|
||||
---@param bandageTable any bandages info
|
||||
---@param painkillerTable any painkillers info, not used
|
||||
JCIO.CutLimb = function(partName, surgeonFactor, bandageTable, painkillerTable)
|
||||
TOC.CutLimb = function(partName, surgeonFactor, bandageTable, painkillerTable)
|
||||
|
||||
-- TODO Separate Cut Limb in side and limb instead of single part_name
|
||||
|
||||
-- Items get unequipped in ISCutLimb.Start
|
||||
local player = getPlayer()
|
||||
|
||||
local jcioModData = player:getModData().JCIO
|
||||
local limbParameters = JCIO.limbParameters
|
||||
local limbsData = jcioModData.limbs
|
||||
local TOCModData = player:getModData().TOC
|
||||
local limbParameters = TOC.limbParameters
|
||||
local limbsData = TOCModData.limbs
|
||||
|
||||
|
||||
-- Cut Hand -> Damage in forearm
|
||||
-- Cut Forearm -> Damage in Upperarm
|
||||
-- Cut UpperArm -> Damage to torso
|
||||
local bodyDamage = player:getBodyDamage()
|
||||
local bodyPart = bodyDamage:getBodyPart(JCIO_Common.GetBodyPartFromPartName(partName))
|
||||
local adjacentBodyPart = player:getBodyDamage():getBodyPart(JCIO_Common.GetAdjacentBodyPartFromPartName(partName))
|
||||
local bodyPart = bodyDamage:getBodyPart(TOC_Common.GetBodyPartFromPartName(partName))
|
||||
local adjacentBodyPart = player:getBodyDamage():getBodyPart(TOC_Common.GetAdjacentBodyPartFromPartName(partName))
|
||||
|
||||
local stats = player:getStats()
|
||||
local side = JCIO_Common.GetSideFromPartName(partName)
|
||||
local side = TOC_Common.GetSideFromPartName(partName)
|
||||
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ JCIO.CutLimb = function(partName, surgeonFactor, bandageTable, painkillerTable)
|
||||
|
||||
local canHealDependedV = limbsData[depended_v].isInfected and
|
||||
bodyDamage:getInfectionLevel() < 20
|
||||
local depended_body_part = bodyDamage:getBodyPart(JCIO_Common.GetBodyPartFromPartName(depended_v))
|
||||
local depended_body_part = bodyDamage:getBodyPart(TOC_Common.GetBodyPartFromPartName(depended_v))
|
||||
SetParametersForMissingLimb(depended_body_part, canHealDependedV)
|
||||
|
||||
if canHealDependedV then
|
||||
@@ -275,19 +275,19 @@ JCIO.CutLimb = function(partName, surgeonFactor, bandageTable, painkillerTable)
|
||||
DeleteOtherAmputatedLimbs(side)
|
||||
|
||||
--Equip new model for amputation
|
||||
local amputation_clothing_item_name = JCIO_Common.FindAmputatedClothingName(partName)
|
||||
local amputation_clothing_item_name = TOC_Common.FindAmputatedClothingName(partName)
|
||||
print(amputation_clothing_item_name)
|
||||
|
||||
local amputation_clothing_item = player:getInventory():AddItem(amputation_clothing_item_name)
|
||||
JCIO_Visuals.SetTextureForAmputation(amputation_clothing_item, player, false)
|
||||
TOC_Visuals.SetTextureForAmputation(amputation_clothing_item, player, false)
|
||||
player:setWornItem(amputation_clothing_item:getBodyLocation(), amputation_clothing_item)
|
||||
|
||||
|
||||
-- Set blood on the amputated limb
|
||||
JCIO_Visuals.SetBloodOnAmputation(getPlayer(), adjacentBodyPart)
|
||||
TOC_Visuals.SetBloodOnAmputation(getPlayer(), adjacentBodyPart)
|
||||
|
||||
if partName == "Left_Foot" or partName == "Right_Foot" then
|
||||
JCIO_Anims.SetMissingFootAnimation(true)
|
||||
TOC_Anims.SetMissingFootAnimation(true)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
------------------------------------------
|
||||
------------- JUST CUT IT OUT ------------
|
||||
-------------- THE ONLY CURE -------------
|
||||
------------------------------------------
|
||||
------------- LOCAL ACTIONS --------------
|
||||
|
||||
--Used to handle SP scenarios
|
||||
|
||||
|
||||
if JCIO_LocalActions == nil then
|
||||
JCIO_LocalActions = {}
|
||||
if TOC_LocalActions == nil then
|
||||
TOC_LocalActions = {}
|
||||
end
|
||||
|
||||
|
||||
function JCIO_LocalActions.Cut(_, player, partName)
|
||||
if JCIO_Common.GetSawInInventory(player) ~= nil then
|
||||
ISTimedActionQueue.add(JCIO_CutLimbAction:new(player, player, partName))
|
||||
function TOC_LocalActions.Cut(_, player, partName)
|
||||
if TOC_Common.GetSawInInventory(player) ~= nil then
|
||||
ISTimedActionQueue.add(TOC_CutLimbAction:new(player, player, partName))
|
||||
else
|
||||
player:Say("I don't have a saw on me")
|
||||
end
|
||||
end
|
||||
|
||||
function JCIO_LocalActions.Operate(_, player, partName, useOven)
|
||||
function TOC_LocalActions.Operate(_, player, partName, useOven)
|
||||
if useOven then
|
||||
ISTimedActionQueue.add(JCIO_OperateLimbAction:new(player, player, _, partName, useOven));
|
||||
ISTimedActionQueue.add(TOC_OperateLimbAction:new(player, player, _, partName, useOven));
|
||||
else
|
||||
local kit = JCIO_Common.GetKitInInventory(player)
|
||||
local kit = TOC_Common.GetKitInInventory(player)
|
||||
if kit ~= nil then
|
||||
ISTimedActionQueue.add(JCIO_OperateLimbAction:new(player, player, kit, partName, false))
|
||||
ISTimedActionQueue.add(TOC_OperateLimbAction:new(player, player, kit, partName, false))
|
||||
else
|
||||
player:Say("I don't have a kit on me")
|
||||
end
|
||||
@@ -33,18 +33,18 @@ function JCIO_LocalActions.Operate(_, player, partName, useOven)
|
||||
end
|
||||
|
||||
-- TODO This is gonna get deleted
|
||||
function JCIO_LocalActions.EquipProsthesis(_, player, partName)
|
||||
function TOC_LocalActions.EquipProsthesis(_, player, partName)
|
||||
local surgeonInv = player:getInventory()
|
||||
local prosthesisToEquip = surgeonInv:getItemFromType('TOC.MetalHand') or
|
||||
surgeonInv:getItemFromType('TOC.MetalHook') or
|
||||
surgeonInv:getItemFromType('TOC.WoodenHook')
|
||||
if prosthesisToEquip then
|
||||
ISTimedActionQueue.add(JCIO_InstallProsthesisAction:new(player, player, prosthesisToEquip, partName))
|
||||
ISTimedActionQueue.add(TOC_InstallProsthesisAction:new(player, player, prosthesisToEquip, partName))
|
||||
else
|
||||
player:Say("I need a prosthesis")
|
||||
end
|
||||
end
|
||||
|
||||
function JCIO_LocalActions.UnequipProsthesis(_, player, partName)
|
||||
ISTimedActionQueue.add(JCIO_UninstallProsthesisAction:new(player, player, partName))
|
||||
function TOC_LocalActions.UnequipProsthesis(_, player, partName)
|
||||
ISTimedActionQueue.add(TOC_UninstallProsthesisAction:new(player, player, partName))
|
||||
end
|
||||
|
||||
@@ -22,11 +22,11 @@ end
|
||||
local function SetBodyPartsStatusAfterOperation(player, limbParameters, partName, useOven)
|
||||
|
||||
|
||||
local bodyPartType = player:getBodyDamage():getBodyPart(JCIO_Common.GetAdjacentBodyPartFromPartName(partName))
|
||||
local bodyPartType = player:getBodyDamage():getBodyPart(TOC_Common.GetAdjacentBodyPartFromPartName(partName))
|
||||
FixSingleBodyPartType(bodyPartType, useOven)
|
||||
|
||||
for _, v in pairs(limbParameters[partName].dependsOn) do
|
||||
local dependedBodyPartType = player:getBodyDamage():getBodyPart(JCIO_Common.GetAdjacentBodyPartFromPartName(v))
|
||||
local dependedBodyPartType = player:getBodyDamage():getBodyPart(TOC_Common.GetAdjacentBodyPartFromPartName(v))
|
||||
FixSingleBodyPartType(dependedBodyPartType, useOven)
|
||||
|
||||
end
|
||||
@@ -39,15 +39,15 @@ end
|
||||
---@param partName any
|
||||
---@param surgeonFactor any
|
||||
---@param useOven boolean wheter using oven instead of a kit or not
|
||||
function JCIO.OperateLimb(partName, surgeonFactor, useOven)
|
||||
function TOC.OperateLimb(partName, surgeonFactor, useOven)
|
||||
|
||||
local player = getPlayer()
|
||||
|
||||
|
||||
local jcioModData = player:getModData().JCIO
|
||||
local TOCModData = player:getModData().TOC
|
||||
|
||||
local limbParameters = JCIO.limbParameters
|
||||
local limbsData = jcioModData.limbs
|
||||
local limbParameters = TOC.limbParameters
|
||||
local limbsData = TOCModData.limbs
|
||||
|
||||
if useOven then
|
||||
local stats = player:getStats()
|
||||
|
||||
@@ -8,32 +8,32 @@
|
||||
---@param partName string
|
||||
---@param prosthesisItem any the prosthesis item
|
||||
---@param prosthesisBaseName string I don't really remember
|
||||
function JCIO.EquipProsthesis(partName, prosthesisItem, prosthesisBaseName)
|
||||
function TOC.EquipProsthesis(partName, prosthesisItem, prosthesisBaseName)
|
||||
|
||||
-- TODO probably will have to move this from the TOC menu to classic equip to have dynamic durability
|
||||
-- TODO We need to pass the original item so we can get its data!
|
||||
|
||||
local player = getPlayer()
|
||||
local jcioModData = player:getModData().JCIO
|
||||
local TOCModData = player:getModData().TOC
|
||||
|
||||
local equippedProsthesis = GenerateEquippedProsthesis(prosthesisItem, player:getInventory(), "Hand")
|
||||
|
||||
|
||||
--print("JCIO: Test durability new item " .. added_prosthesis_mod_data.TOC.durability)
|
||||
--print("TOC: Test durability new item " .. added_prosthesis_mod_data.TOC.durability)
|
||||
|
||||
-- TODO equippedProsthesis must have something like the ProsthesisFactor from before!!!
|
||||
|
||||
if partName ~= nil then
|
||||
|
||||
if equippedProsthesis ~= nil then
|
||||
jcioModData.limbs[partName].isProsthesisEquipped = true
|
||||
TOCModData.limbs[partName].isProsthesisEquipped = true
|
||||
|
||||
|
||||
-- Fill equippedProsthesis with the correct stuff
|
||||
-- TODO For prosthetics we should fetch the data from a modData INSIDE them!
|
||||
|
||||
-- TODO Change the value passed, it's wrong
|
||||
--jcioModData.limbs[partName].equippedProsthesis = jcioModData.Prosthesis[prosthesisBaseName][partName]
|
||||
--TOCModData.limbs[partName].equippedProsthesis = TOCModData.Prosthesis[prosthesisBaseName][partName]
|
||||
|
||||
if player:isFemale() then
|
||||
equippedProsthesis:getVisual():setTextureChoice(1)
|
||||
@@ -51,13 +51,13 @@ end
|
||||
|
||||
---Unequip a prosthesis clothing item and returns it to the inventory as a normal item
|
||||
---@param partName string
|
||||
function JCIO.UnequipProsthesis(patient, partName, equippedProsthesis)
|
||||
function TOC.UnequipProsthesis(patient, partName, equippedProsthesis)
|
||||
|
||||
|
||||
-- TODO Pass the parameters generated from EquipProsthesis to the re-generated normal item
|
||||
|
||||
local jcioModData = patient:getModData().JCIO
|
||||
jcioModData.limbs[partName].isProsthesisEquipped = false
|
||||
local TOCModData = patient:getModData().TOC
|
||||
TOCModData.limbs[partName].isProsthesisEquipped = false
|
||||
|
||||
|
||||
local equippedProstFullType = equippedProsthesis:getFullType()
|
||||
@@ -70,16 +70,16 @@ function JCIO.UnequipProsthesis(patient, partName, equippedProsthesis)
|
||||
local equippedProstModData = equippedProsthesis:getModData()
|
||||
|
||||
|
||||
local baseProstItem = patient:getInventory():AddItem("JCIO." .. prostName)
|
||||
local baseProstItem = patient:getInventory():AddItem("TOC." .. prostName)
|
||||
local baseProstItemModData = baseProstItem.getModData()
|
||||
baseProstItemModData.JCIO = {
|
||||
durability = equippedProstModData.JCIO.durability,
|
||||
speed = equippedProstModData.JCIO.speed
|
||||
baseProstItemModData.TOC = {
|
||||
durability = equippedProstModData.TOC.durability,
|
||||
speed = equippedProstModData.TOC.speed
|
||||
}
|
||||
|
||||
patient:setWornItem(equippedProsthesis:getBodyLocation(), nil)
|
||||
patient:getInventory():Remove(equippedProsthesis)
|
||||
jcioModData.limbs[partName].equippedProsthesis = nil
|
||||
TOCModData.limbs[partName].equippedProsthesis = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,15 +1,15 @@
|
||||
-- TODO this should be moved
|
||||
|
||||
local function TryToToResetEverythingOtherPlayer(_, patient, surgeon)
|
||||
sendClientCommand(surgeon, "JCIO", "AskToResetEverything", { patient:getOnlineID() })
|
||||
sendClientCommand(surgeon, "TOC", "AskToResetEverything", { patient:getOnlineID() })
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------------------------------------
|
||||
if JCIO_ContextMenu == nil then
|
||||
JCIO_ContextMenu = {}
|
||||
if TOC_ContextMenu == nil then
|
||||
TOC_ContextMenu = {}
|
||||
end
|
||||
|
||||
JCIO_ContextMenu.CreateCheatsMenu = function(playerId, context, worldObjects, _)
|
||||
TOC_ContextMenu.CreateCheatsMenu = function(playerId, context, worldObjects, _)
|
||||
local clickedPlayers = {}
|
||||
local currentClickedPlayer = nil
|
||||
|
||||
@@ -37,10 +37,10 @@ JCIO_ContextMenu.CreateCheatsMenu = function(playerId, context, worldObjects, _)
|
||||
local rootMenu = context:getNew(context)
|
||||
|
||||
if currentClickedPlayer == localPlayer then
|
||||
rootMenu:addOption("Reset JCIO for me", _, JCIO_Cheat.ResetEverything)
|
||||
rootMenu:addOption("Reset TOC for me", _, TOC_Cheat.ResetEverything)
|
||||
|
||||
else
|
||||
rootMenu:addOption("Reset JCIO for " .. currentClickedPlayer:getUsername(), _, TryToToResetEverythingOtherPlayer,
|
||||
rootMenu:addOption("Reset TOC for " .. currentClickedPlayer:getUsername(), _, TryToToResetEverythingOtherPlayer,
|
||||
currentClickedPlayer, localPlayer)
|
||||
|
||||
end
|
||||
@@ -65,11 +65,11 @@ JCIO_ContextMenu.CreateCheatsMenu = function(playerId, context, worldObjects, _)
|
||||
end
|
||||
|
||||
|
||||
JCIO_ContextMenu.CreateOperateWithOvenMenu = function(playerId, context, worldObjects, test)
|
||||
TOC_ContextMenu.CreateOperateWithOvenMenu = function(playerId, context, worldObjects, test)
|
||||
local player = getSpecificPlayer(playerId)
|
||||
-- TODO Let the player move towards the oven
|
||||
|
||||
local partData = player:getModData().JCIO.limbs
|
||||
local partData = player:getModData().TOC.limbs
|
||||
local isMainMenuAlreadyCreated = false
|
||||
|
||||
for _, currentObject in pairs(worldObjects) do
|
||||
@@ -78,7 +78,7 @@ JCIO_ContextMenu.CreateOperateWithOvenMenu = function(playerId, context, worldOb
|
||||
-- Check temperature
|
||||
if currentObject:getCurrentTemperature() > 250 then
|
||||
|
||||
for _, partName in ipairs(JCIO_Common.GetPartNames()) do
|
||||
for _, partName in ipairs(TOC_Common.GetPartNames()) do
|
||||
if partData[partName].isCut and partData[partName].isAmputationShown and
|
||||
not partData[partName].isOperated then
|
||||
local subMenu = context:getNew(context);
|
||||
@@ -88,7 +88,7 @@ JCIO_ContextMenu.CreateOperateWithOvenMenu = function(playerId, context, worldOb
|
||||
context:addSubMenu(rootMenu, subMenu)
|
||||
isMainMenuAlreadyCreated = true
|
||||
end
|
||||
subMenu:addOption(getText('UI_ContextMenu_' .. partName), worldObjects, JCIO_LocalActions.Operate,
|
||||
subMenu:addOption(getText('UI_ContextMenu_' .. partName), worldObjects, TOC_LocalActions.Operate,
|
||||
getSpecificPlayer(playerId), partName,true)
|
||||
end
|
||||
end
|
||||
@@ -101,7 +101,7 @@ JCIO_ContextMenu.CreateOperateWithOvenMenu = function(playerId, context, worldOb
|
||||
end
|
||||
end
|
||||
|
||||
JCIO_ContextMenu.CreateNewMenu = function(name, context, rootMenu)
|
||||
TOC_ContextMenu.CreateNewMenu = function(name, context, rootMenu)
|
||||
|
||||
local new_option = rootMenu:addOption(name)
|
||||
local new_menu = context:getNew(context)
|
||||
@@ -110,14 +110,14 @@ JCIO_ContextMenu.CreateNewMenu = function(name, context, rootMenu)
|
||||
return new_menu
|
||||
end
|
||||
|
||||
JCIO_ContextMenu.FillCheatMenus = function(context, cheat_menu)
|
||||
TOC_ContextMenu.FillCheatMenus = function(context, cheat_menu)
|
||||
|
||||
if cheat_menu then
|
||||
local cheat_cut_and_fix_menu = JCIO_ContextMenu.CreateNewMenu("Cut and Fix", context, cheat_menu)
|
||||
local cheat_cut_and_fix_menu = TOC_ContextMenu.CreateNewMenu("Cut and Fix", context, cheat_menu)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Events.OnFillWorldObjectContextMenu.Add(JCIO_ContextMenu.CreateOperateWithOvenMenu) -- this is probably too much
|
||||
Events.OnFillWorldObjectContextMenu.Add(JCIO_ContextMenu.CreateCheatsMenu) -- TODO Add check only when admin is active
|
||||
Events.OnFillWorldObjectContextMenu.Add(TOC_ContextMenu.CreateOperateWithOvenMenu) -- this is probably too much
|
||||
Events.OnFillWorldObjectContextMenu.Add(TOC_ContextMenu.CreateCheatsMenu) -- TODO Add check only when admin is active
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
if JCIO_UI == nil then
|
||||
JCIO_UI = {}
|
||||
if TOC_UI == nil then
|
||||
TOC_UI = {}
|
||||
end
|
||||
|
||||
|
||||
@@ -45,33 +45,33 @@ local function GetImageName(partName, limbsData)
|
||||
|
||||
if partData.isCut and partData.isCicatrized and partData.isProsthesisEquipped then -- Cut and equip
|
||||
if partName == "Right_Hand" or partName == "Left_Hand" then
|
||||
name = "media/ui/JCIO/" .. partName .. "/Hook.png"
|
||||
name = "media/ui/TOC/" .. partName .. "/Hook.png"
|
||||
else
|
||||
name = "media/ui/JCIO/" .. partName .. "/Prothesis.png"
|
||||
name = "media/ui/TOC/" .. partName .. "/Prothesis.png"
|
||||
end
|
||||
elseif partData.isCut and partData.isCicatrized and not partData.isProsthesisEquipped and
|
||||
partData.isAmputationShown then -- Cut and heal
|
||||
name = "media/ui/JCIO/" .. partName .. "/Cut.png"
|
||||
name = "media/ui/TOC/" .. partName .. "/Cut.png"
|
||||
elseif partData.isCut and not partData.isCicatrized and partData.isAmputationShown and
|
||||
not partData.isOperated then -- Cut but not healead
|
||||
name = "media/ui/JCIO/" .. partName .. "/Bleed.png"
|
||||
name = "media/ui/TOC/" .. partName .. "/Bleed.png"
|
||||
elseif partData.isCut and not partData.isCicatrized and partData.isAmputationShown and partData.isOperated then -- Cut but not healed and operated
|
||||
name = "media/ui/JCIO/" .. partName .. "/Operate.png"
|
||||
name = "media/ui/TOC/" .. partName .. "/Operate.png"
|
||||
elseif partData.isCut and not partData.isAmputationShown then -- Empty (like hand if forearm cut)
|
||||
name = "media/ui/JCIO/Empty.png"
|
||||
name = "media/ui/TOC/Empty.png"
|
||||
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
|
||||
getPlayer():getBodyDamage():getBodyPart(JCIO_Common.GetBodyPartFromPartName(partName)):bitten() then -- Not cut but bitten
|
||||
name = "media/ui/JCIO/" .. partName .. "/Bite.png"
|
||||
getPlayer():getBodyDamage():getBodyPart(TOC_Common.GetBodyPartFromPartName(partName)):bitten() then -- Not cut but bitten
|
||||
name = "media/ui/TOC/" .. partName .. "/Bite.png"
|
||||
else -- Not cut
|
||||
name = "media/ui/JCIO/" .. partName .. "/Base.png"
|
||||
name = "media/ui/TOC/" .. partName .. "/Base.png"
|
||||
end
|
||||
|
||||
-- If foreaerm equip, change hand
|
||||
if partName == "Right_Hand" and limbsData["Right_LowerArm"].isProsthesisEquipped then
|
||||
name = "media/ui/JCIO/" .. partName .. "/Hook.png"
|
||||
name = "media/ui/TOC/" .. partName .. "/Hook.png"
|
||||
elseif partName == "Left_Hand" and limbsData["Left_LowerArm"].isProsthesisEquipped then
|
||||
name = "media/ui/JCIO/" .. partName .. "/Hook.png"
|
||||
name = "media/ui/TOC/" .. partName .. "/Hook.png"
|
||||
end
|
||||
return name
|
||||
end
|
||||
@@ -101,7 +101,7 @@ end
|
||||
|
||||
local function IsPartBitten(partData, partName)
|
||||
return not partData.isCut and
|
||||
getPlayer():getBodyDamage():getBodyPart(JCIO_Common.GetBodyPartFromPartName(partName)):bitten()
|
||||
getPlayer():getBodyDamage():getBodyPart(TOC_Common.GetBodyPartFromPartName(partName)):bitten()
|
||||
end
|
||||
|
||||
local function FindMinMax(lv)
|
||||
@@ -144,7 +144,7 @@ end
|
||||
-----------------------------------------
|
||||
-- Setup stuff with variables and shit
|
||||
|
||||
JCIO_UI.SetupMainUI = function(surgeon, patient, limbsData)
|
||||
TOC_UI.SetupMainUI = function(surgeon, patient, limbsData)
|
||||
mainUI.surgeon = surgeon -- we shouldn't need an arg for this
|
||||
mainUI.patient = patient
|
||||
|
||||
@@ -169,7 +169,7 @@ JCIO_UI.SetupMainUI = function(surgeon, patient, limbsData)
|
||||
|
||||
end
|
||||
|
||||
JCIO_UI.SetupDescUI = function(surgeon, patient, limbsData, partName)
|
||||
TOC_UI.SetupDescUI = function(surgeon, patient, limbsData, partName)
|
||||
descUI["textTitle"]:setText(getText("UI_ContextMenu_" .. partName))
|
||||
descUI.partName = partName
|
||||
descUI.surgeon = surgeon
|
||||
@@ -239,16 +239,16 @@ JCIO_UI.SetupDescUI = function(surgeon, patient, limbsData, partName)
|
||||
descUI["status"]:setText("Nothing here")
|
||||
descUI["status"]:setColor(1, 1, 1, 1)
|
||||
descUI["b1"]:setVisible(false)
|
||||
elseif JCIO_Common.CheckIfCanBeCut(partName, limbsData) then
|
||||
elseif TOC_Common.CheckIfCanBeCut(partName, limbsData) then
|
||||
-- Everything else
|
||||
-- TODO add check for cuts and scratches
|
||||
descUI["status"]:setText("Not cut")
|
||||
descUI["status"]:setColor(1, 1, 1, 1)
|
||||
if JCIO_Common.GetSawInInventory(surgeon) and not JCIO_Common.CheckIfProsthesisAlreadyInstalled(limbsData, partName) then
|
||||
if TOC_Common.GetSawInInventory(surgeon) and not TOC_Common.CheckIfProsthesisAlreadyInstalled(limbsData, partName) then
|
||||
descUI["b1"]:setVisible(true)
|
||||
descUI["b1"]:setText("Cut")
|
||||
descUI["b1"]:addArg("option", "Cut")
|
||||
elseif JCIO_Common.GetSawInInventory(surgeon) and JCIO_Common.CheckIfProsthesisAlreadyInstalled(limbsData, partName) then
|
||||
elseif TOC_Common.GetSawInInventory(surgeon) and TOC_Common.CheckIfProsthesisAlreadyInstalled(limbsData, partName) then
|
||||
descUI["b1"]:setVisible(true)
|
||||
descUI["b1"]:setText("Remove prosthesis before")
|
||||
descUI["b1"]:addArg("option", "Nothing")
|
||||
@@ -294,25 +294,25 @@ local function OnClickMainUI(button, args)
|
||||
|
||||
descUI:open()
|
||||
descUI:setPositionPixel(mainUI:getRight(), mainUI:getY())
|
||||
JCIO_UI.SetupDescUI(mainUI.surgeon, mainUI.patient, mainUI.limbsData, args.partName) -- surgeon is generic.
|
||||
TOC_UI.SetupDescUI(mainUI.surgeon, mainUI.patient, mainUI.limbsData, args.partName) -- surgeon is generic.
|
||||
|
||||
end
|
||||
|
||||
-- Generic JCIO action, used in OnClickDescUI
|
||||
local function TryJcioAction(_, partName, action, surgeon, patient)
|
||||
-- Generic TOC action, used in OnClickDescUI
|
||||
local function TryTOCAction(_, partName, action, surgeon, patient)
|
||||
-- TODO at this point surgeon doesnt do anything. We'll fix this later
|
||||
|
||||
-- Check if SinglePlayer
|
||||
if not isServer() and not isClient() then
|
||||
|
||||
if action == "Cut" then
|
||||
JCIO_LocalActions.Cut(_, surgeon, partName)
|
||||
TOC_LocalActions.Cut(_, surgeon, partName)
|
||||
elseif action == "Operate" then
|
||||
JCIO_LocalActions.Operate(_, surgeon, partName, false)
|
||||
TOC_LocalActions.Operate(_, surgeon, partName, false)
|
||||
elseif action == "Equip" then
|
||||
JCIO_LocalActions.EquipProsthesis(_, surgeon, partName)
|
||||
TOC_LocalActions.EquipProsthesis(_, surgeon, partName)
|
||||
elseif action == "Unequip" then
|
||||
JCIO_LocalActions.UnequipProsthesis(_, surgeon, partName)
|
||||
TOC_LocalActions.UnequipProsthesis(_, surgeon, partName)
|
||||
end
|
||||
else
|
||||
local ui = GetConfirmUIMP()
|
||||
@@ -353,7 +353,7 @@ local function OnClickDescUI(button, args)
|
||||
local surgeon = descUI.surgeon
|
||||
|
||||
if args.option ~= "Nothing" then
|
||||
TryJcioAction(_, descUI.partName, args.option, surgeon, patient)
|
||||
TryTOCAction(_, descUI.partName, args.option, surgeon, patient)
|
||||
end
|
||||
mainUI:close()
|
||||
|
||||
@@ -362,11 +362,11 @@ end
|
||||
local function OnClickConfirmUIMP(button, args)
|
||||
local player = getPlayer()
|
||||
if confirmUIMP.actionAct == "Cut" and args.option == "yes" then
|
||||
ISTimedActionQueue.add(JCIO_CutLimbAction:new(confirmUIMP.patient, player, confirmUIMP.partNameAct))
|
||||
ISTimedActionQueue.add(TOC_CutLimbAction:new(confirmUIMP.patient, player, confirmUIMP.partNameAct))
|
||||
elseif confirmUIMP.actionAct == "Operate" and args.option == "yes" then
|
||||
local kit = JCIO_Common.GetKitInInventory(player)
|
||||
local kit = TOC_Common.GetKitInInventory(player)
|
||||
if kit then
|
||||
ISTimedActionQueue.add(JCIO_OperateLimbAction:new(confirmUIMP.patient, player, kit, confirmUIMP.partNameAct,
|
||||
ISTimedActionQueue.add(TOC_OperateLimbAction:new(confirmUIMP.patient, player, kit, confirmUIMP.partNameAct,
|
||||
false))
|
||||
else
|
||||
player:Say("I need a kit")
|
||||
@@ -383,7 +383,7 @@ local function OnClickConfirmUIMP(button, args)
|
||||
surgeon_inventory:getItemFromType('TOC.WoodenHook')
|
||||
|
||||
if prosthesis_to_equip then
|
||||
ISTimedActionQueue.add(JCIO_InstallProsthesisAction:new(player, confirmUIMP.patient, prosthesis_to_equip,
|
||||
ISTimedActionQueue.add(TOC_InstallProsthesisAction:new(player, confirmUIMP.patient, prosthesis_to_equip,
|
||||
confirmUIMP.partNameAct))
|
||||
else
|
||||
player:Say("I don't have a prosthesis right now")
|
||||
@@ -397,7 +397,7 @@ local function OnClickConfirmUIMP(button, args)
|
||||
-- TODO Player is surgeon, but we don't have a confirm_ui_mp.surgeon... awful awful awful
|
||||
-- TODO Workaround for now, we'd need to send data from patient before doing it since we can't access his inventory from the surgeon
|
||||
if confirmUIMP.patient == player then
|
||||
ISTimedActionQueue.add(JCIO_UninstallProsthesisAction:new(player, confirmUIMP.patient, confirmUIMP.partNameAct))
|
||||
ISTimedActionQueue.add(TOC_UninstallProsthesisAction:new(player, confirmUIMP.patient, confirmUIMP.partNameAct))
|
||||
|
||||
else
|
||||
player:Say("I can't do that, they need to do it themselves")
|
||||
@@ -538,7 +538,7 @@ end
|
||||
|
||||
-- We create everything from here
|
||||
|
||||
JCIO_UI.OnCreate = function()
|
||||
TOC_UI.OnCreate = function()
|
||||
CreateMainUI()
|
||||
CreateDescUI()
|
||||
CreateConfirmUIMP()
|
||||
@@ -580,40 +580,40 @@ function SendCommandToConfirmUIMP(action, isBitten, userName, partName)
|
||||
end
|
||||
|
||||
--------------------------------------------
|
||||
-- Add JCIO element to Health Panel
|
||||
-- Add TOC element to Health Panel
|
||||
|
||||
|
||||
|
||||
JCIO_UI.onlineTempTable = {patient = nil, surgeon = nil}
|
||||
TOC_UI.onlineTempTable = {patient = nil, surgeon = nil}
|
||||
|
||||
JCIO.RefreshClientMenu = function(_)
|
||||
TOC.RefreshClientMenu = function(_)
|
||||
if mainUI:getIsVisible() == false then
|
||||
Events.OnTick.Remove(JCIO.RefreshClientMenu)
|
||||
JCIO_UI.onlineTempTable.patient = nil
|
||||
JCIO_UI.onlineTempTable.surgeon = nil
|
||||
Events.OnTick.Remove(TOC.RefreshClientMenu)
|
||||
TOC_UI.onlineTempTable.patient = nil
|
||||
TOC_UI.onlineTempTable.surgeon = nil
|
||||
|
||||
else
|
||||
|
||||
local limbs_data = JCIO_UI.onlineTempTable.patient:getModData().JCIO.limbs
|
||||
JCIO_UI.SetupMainUI(JCIO_UI.onlineTempTable.patient, JCIO_UI.onlineTempTable.patient, limbs_data)
|
||||
local limbs_data = TOC_UI.onlineTempTable.patient:getModData().TOC.limbs
|
||||
TOC_UI.SetupMainUI(TOC_UI.onlineTempTable.patient, TOC_UI.onlineTempTable.patient, limbs_data)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
JCIO.RefreshOtherPlayerMenu = function(_)
|
||||
TOC.RefreshOtherPlayerMenu = function(_)
|
||||
|
||||
if mainUI:getIsVisible() == false then
|
||||
|
||||
Events.OnTick.Remove(JCIO.RefreshOtherPlayerMenu)
|
||||
JCIO_UI.onlineTempTable.patient = nil
|
||||
JCIO_UI.onlineTempTable.surgeon = nil
|
||||
Events.OnTick.Remove(TOC.RefreshOtherPlayerMenu)
|
||||
TOC_UI.onlineTempTable.patient = nil
|
||||
TOC_UI.onlineTempTable.surgeon = nil
|
||||
|
||||
else
|
||||
if ModData.get("JCIO_PLAYER_DATA")[JCIO_UI.onlineTempTable.patient:getUsername()] ~= nil then
|
||||
local otherPlayerPartData = ModData.get("JCIO_PLAYER_DATA")[JCIO_UI.onlineTempTable.patient:getUsername()]
|
||||
if ModData.get("TOC_PLAYER_DATA")[TOC_UI.onlineTempTable.patient:getUsername()] ~= nil then
|
||||
local otherPlayerPartData = ModData.get("TOC_PLAYER_DATA")[TOC_UI.onlineTempTable.patient:getUsername()]
|
||||
|
||||
JCIO_UI.SetupMainUI(JCIO_UI.onlineTempTable.surgeon, JCIO_UI.onlineTempTable.patient, otherPlayerPartData[1])
|
||||
TOC_UI.SetupMainUI(TOC_UI.onlineTempTable.surgeon, TOC_UI.onlineTempTable.patient, otherPlayerPartData[1])
|
||||
|
||||
|
||||
end
|
||||
@@ -627,27 +627,27 @@ end
|
||||
local ISHealthPanel_createChildren = ISHealthPanel.createChildren
|
||||
local ISHealthPanel_render = ISHealthPanel.render
|
||||
-- Add button to health panel
|
||||
function ISNewHealthPanel.onClickJCIO(button)
|
||||
function ISNewHealthPanel.onClickTOC(button)
|
||||
|
||||
local surgeon = button.otherPlayer
|
||||
local patient = button.character
|
||||
|
||||
JCIO_UI.onlineTempTable.patient = patient
|
||||
JCIO_UI.onlineTempTable.surgeon = surgeon
|
||||
TOC_UI.onlineTempTable.patient = patient
|
||||
TOC_UI.onlineTempTable.surgeon = surgeon
|
||||
|
||||
-- MP Handling
|
||||
if surgeon then
|
||||
|
||||
|
||||
if surgeon == patient then
|
||||
Events.OnTick.Add(JCIO.RefreshClientMenu)
|
||||
Events.OnTick.Add(TOC.RefreshClientMenu)
|
||||
|
||||
else
|
||||
Events.OnTick.Add(JCIO.RefreshOtherPlayerMenu) -- MP stuff, try to get the other player data and display it on the surgeon display
|
||||
Events.OnTick.Add(TOC.RefreshOtherPlayerMenu) -- MP stuff, try to get the other player data and display it on the surgeon display
|
||||
end
|
||||
else
|
||||
-- SP Handling
|
||||
Events.OnTick.Add(JCIO.RefreshClientMenu)
|
||||
Events.OnTick.Add(TOC.RefreshClientMenu)
|
||||
end
|
||||
|
||||
|
||||
@@ -661,9 +661,9 @@ function ISNewHealthPanel.onClickJCIO(button)
|
||||
|
||||
local main_title
|
||||
if separatedUsername[1] == nil then
|
||||
main_title = patient:getUsername() .. " - JCIO"
|
||||
main_title = patient:getUsername() .. " - TOC"
|
||||
else
|
||||
main_title = separatedUsername[1] .. " " .. separatedUsername[2] .. " - JCIO"
|
||||
main_title = separatedUsername[1] .. " " .. separatedUsername[2] .. " - TOC"
|
||||
end
|
||||
|
||||
mainUI:setTitle(main_title)
|
||||
@@ -678,23 +678,23 @@ function ISHealthPanel:createChildren()
|
||||
|
||||
self.fitness:setWidth(self.fitness:getWidth() / 1.4)
|
||||
|
||||
self.JCIOButton = ISButton:new(self.fitness:getRight() + 10, self.healthPanel.y, 60, 20, "", self,
|
||||
ISNewHealthPanel.onClickJCIO)
|
||||
self.JCIOButton:setImage(getTexture("media/ui/JCIO/iconForMenu.png"))
|
||||
self.JCIOButton.anchorTop = false
|
||||
self.JCIOButton.anchorBottom = true
|
||||
self.JCIOButton:initialise()
|
||||
self.JCIOButton:instantiate()
|
||||
self:addChild(self.JCIOButton)
|
||||
self.TOCButton = ISButton:new(self.fitness:getRight() + 10, self.healthPanel.y, 60, 20, "", self,
|
||||
ISNewHealthPanel.onClickTOC)
|
||||
self.TOCButton:setImage(getTexture("media/ui/TOC/iconForMenu.png"))
|
||||
self.TOCButton.anchorTop = false
|
||||
self.TOCButton.anchorBottom = true
|
||||
self.TOCButton:initialise()
|
||||
self.TOCButton:instantiate()
|
||||
self:addChild(self.TOCButton)
|
||||
if getCore():getGameMode() == "Tutorial" then
|
||||
self.JCIOButton:setVisible(false)
|
||||
self.TOCButton:setVisible(false)
|
||||
end
|
||||
end
|
||||
|
||||
function ISHealthPanel:render()
|
||||
ISHealthPanel_render(self);
|
||||
self.JCIOButton:setY(self.fitness:getY());
|
||||
self.TOCButton:setY(self.fitness:getY());
|
||||
end
|
||||
|
||||
-- EVENTS
|
||||
Events.OnCreateUI.Add(JCIO_UI.OnCreate)
|
||||
Events.OnCreateUI.Add(TOC_UI.OnCreate)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
-- Thanks to Glytcher and Matías N. Salas for helping out with this
|
||||
|
||||
if JCIO_Anims == nil then
|
||||
JCIO_Anims = {}
|
||||
if TOC_Anims == nil then
|
||||
TOC_Anims = {}
|
||||
end
|
||||
|
||||
|
||||
JCIO_Anims.SetMissingFootAnimation = function(check)
|
||||
TOC_Anims.SetMissingFootAnimation = function(check)
|
||||
local player = getPlayer()
|
||||
player:setVariable("IsCrawling", tostring(check))
|
||||
|
||||
@@ -13,13 +13,13 @@ JCIO_Anims.SetMissingFootAnimation = function(check)
|
||||
print("SP, so it's fine")
|
||||
else
|
||||
|
||||
sendClientCommand(player, "JCIO", "NotifyNewCrawlAnimation", {id = player:getOnlineID(), check = check})
|
||||
sendClientCommand(player, "TOC", "NotifyNewCrawlAnimation", {id = player:getOnlineID(), check = check})
|
||||
end
|
||||
end
|
||||
|
||||
JCIO_Anims.CheckAndSetMissingFootAnims = function(modData)
|
||||
TOC_Anims.CheckAndSetMissingFootAnims = function(modData)
|
||||
|
||||
if modData.JCIO.limbs["Left_Foot"].isCut or modData.JCIO.limbs["Right_Foot"].isCut then
|
||||
JCIO_Anims.SetMissingFootAnimation(true)
|
||||
if modData.TOC.limbs["Left_Foot"].isCut or modData.TOC.limbs["Right_Foot"].isCut then
|
||||
TOC_Anims.SetMissingFootAnimation(true)
|
||||
end
|
||||
end
|
||||
@@ -1,20 +1,20 @@
|
||||
------------------------------------------
|
||||
------------- JUST CUT IT OUT ------------
|
||||
-------------- THE ONLY CURE -------------
|
||||
------------------------------------------
|
||||
---------------- CHEATS -----------------
|
||||
|
||||
|
||||
if JCIO_Cheat == nil then
|
||||
JCIO_Cheat = {}
|
||||
if TOC_Cheat == nil then
|
||||
TOC_Cheat = {}
|
||||
end
|
||||
|
||||
|
||||
JCIO_Cheat.ResetEverything = function()
|
||||
TOC_Cheat.ResetEverything = function()
|
||||
-- This has to be run on the local player to be sure that we're correctly reassigning everything
|
||||
local player = getPlayer()
|
||||
local playerInv = player:getInventory()
|
||||
local modData = player:getModData()
|
||||
modData.JCIO = nil
|
||||
modData.TOC = nil
|
||||
|
||||
-- Removes traits just to be sure
|
||||
local customTraits = player:getTraits()
|
||||
@@ -23,12 +23,12 @@ JCIO_Cheat.ResetEverything = function()
|
||||
customTraits:remove("Amputee_UpperArm")
|
||||
|
||||
|
||||
JCIO.Init(_, player)
|
||||
TOC.Init(_, player)
|
||||
|
||||
-- Destroy the amputation or prosthesis item
|
||||
for _, partName in pairs(JCIO_Common.GetPartNames()) do
|
||||
local amputationItemName = JCIO_Common.FindAmputationOrProsthesisName(partName, player, "Amputation")
|
||||
local prostItemName = JCIO_Common.FindAmputationOrProsthesisName(partName, player, "Prosthesis")
|
||||
for _, partName in pairs(TOC_Common.GetPartNames()) do
|
||||
local amputationItemName = TOC_Common.FindAmputationOrProsthesisName(partName, player, "Amputation")
|
||||
local prostItemName = TOC_Common.FindAmputationOrProsthesisName(partName, player, "Prosthesis")
|
||||
if amputationItemName ~= nil then
|
||||
local amputationItem = playerInv:FindAndReturn(amputationItemName)
|
||||
if amputationItem ~= nil then
|
||||
@@ -52,6 +52,6 @@ JCIO_Cheat.ResetEverything = function()
|
||||
|
||||
|
||||
-- Reset special flag for legs amputations
|
||||
JCIO_Anims.SetMissingFootAnimation(false)
|
||||
TOC_Anims.SetMissingFootAnimation(false)
|
||||
|
||||
end
|
||||
@@ -1,38 +1,38 @@
|
||||
------------------------------------------
|
||||
------------- JUST CUT IT OUT ------------
|
||||
-------------- THE ONLY CURE -------------
|
||||
------------------------------------------
|
||||
------------ COMMON FUNCTIONS ------------
|
||||
|
||||
if JCIO_Common == nil then
|
||||
JCIO_Common = {}
|
||||
if TOC_Common == nil then
|
||||
TOC_Common = {}
|
||||
end
|
||||
|
||||
|
||||
JCIO_Common.partNames = {}
|
||||
TOC_Common.partNames = {}
|
||||
|
||||
JCIO_Common.GeneratePartNames = function()
|
||||
TOC_Common.GeneratePartNames = function()
|
||||
|
||||
local partNamesTable = {}
|
||||
for _, side in ipairs(JCIO.sideNames) do
|
||||
for _, limb in ipairs(JCIO.limbNames) do
|
||||
for _, side in ipairs(TOC.sideNames) do
|
||||
for _, limb in ipairs(TOC.limbNames) do
|
||||
local tempPartName = side .. "_" .. limb
|
||||
table.insert(partNamesTable, tempPartName)
|
||||
end
|
||||
end
|
||||
|
||||
JCIO_Common.partNames = partNamesTable
|
||||
TOC_Common.partNames = partNamesTable
|
||||
|
||||
end
|
||||
|
||||
JCIO_Common.GetPartNames = function()
|
||||
if JCIO_Common.partNames[1] == nil then
|
||||
JCIO_Common.GeneratePartNames()
|
||||
TOC_Common.GetPartNames = function()
|
||||
if TOC_Common.partNames[1] == nil then
|
||||
TOC_Common.GeneratePartNames()
|
||||
end
|
||||
|
||||
return JCIO_Common.partNames
|
||||
return TOC_Common.partNames
|
||||
end
|
||||
|
||||
JCIO_Common.GetSideFromPartName = function(partName)
|
||||
TOC_Common.GetSideFromPartName = function(partName)
|
||||
|
||||
if string.find(partName, "Left") then
|
||||
return "Left"
|
||||
@@ -44,7 +44,7 @@ end
|
||||
|
||||
---------------------------------
|
||||
|
||||
JCIO_Common.GetAcceptableBodyPartTypes = function()
|
||||
TOC_Common.GetAcceptableBodyPartTypes = function()
|
||||
|
||||
-- TODO Add Foot_L and Foot_R
|
||||
return {
|
||||
@@ -54,7 +54,7 @@ JCIO_Common.GetAcceptableBodyPartTypes = function()
|
||||
|
||||
end
|
||||
|
||||
JCIO_Common.GetOtherBodyPartTypes = function()
|
||||
TOC_Common.GetOtherBodyPartTypes = function()
|
||||
|
||||
return {
|
||||
BodyPartType.Torso_Upper, BodyPartType.Torso_Lower, BodyPartType.Head,
|
||||
@@ -73,11 +73,11 @@ function GetProsthesisList()
|
||||
|
||||
end
|
||||
|
||||
JCIO_Common.FindAmputatedClothingName = function(partName)
|
||||
return "JCIO.Amputation_" .. partName
|
||||
TOC_Common.FindAmputatedClothingName = function(partName)
|
||||
return "TOC.Amputation_" .. partName
|
||||
end
|
||||
|
||||
JCIO_Common.GetPartNameFromBodyPartType = function(bodyPartType)
|
||||
TOC_Common.GetPartNameFromBodyPartType = function(bodyPartType)
|
||||
|
||||
if bodyPartType == BodyPartType.Hand_R then
|
||||
return "Right_Hand"
|
||||
@@ -99,7 +99,7 @@ end
|
||||
|
||||
|
||||
-- 1:1 map of partName to BodyPartType
|
||||
JCIO_Common.GetBodyPartFromPartName = function(partName)
|
||||
TOC_Common.GetBodyPartFromPartName = function(partName)
|
||||
if partName == "Right_Hand" then return BodyPartType.Hand_R end
|
||||
if partName == "Right_LowerArm" then return BodyPartType.ForeArm_R end
|
||||
if partName == "Right_UpperArm" then return BodyPartType.UpperArm_R end
|
||||
@@ -114,7 +114,7 @@ JCIO_Common.GetBodyPartFromPartName = function(partName)
|
||||
end
|
||||
|
||||
-- Custom mapping to make more sense when cutting a limb
|
||||
JCIO_Common.GetAdjacentBodyPartFromPartName = function(partName)
|
||||
TOC_Common.GetAdjacentBodyPartFromPartName = function(partName)
|
||||
|
||||
if partName == "Right_Hand" then return BodyPartType.ForeArm_R end
|
||||
if partName == "Right_LowerArm" then return BodyPartType.UpperArm_R end
|
||||
@@ -136,15 +136,15 @@ function TocFindCorrectClothingProsthesis(itemName, partName)
|
||||
|
||||
end
|
||||
|
||||
JCIO_Common.GetAmputationItemInInventory = function(player, partName)
|
||||
TOC_Common.GetAmputationItemInInventory = function(player, partName)
|
||||
|
||||
local playerInv = player:getInventory()
|
||||
local amputationItemName = JCIO_Common.FindAmputationOrProsthesisName(partName, player, "Amputation")
|
||||
local amputationItemName = TOC_Common.FindAmputationOrProsthesisName(partName, player, "Amputation")
|
||||
local amputationItem = playerInv:FindAndReturn(amputationItemName)
|
||||
return amputationItem
|
||||
end
|
||||
|
||||
JCIO_Common.GetSawInInventory = function(surgeon)
|
||||
TOC_Common.GetSawInInventory = function(surgeon)
|
||||
|
||||
local playerInv = surgeon:getInventory()
|
||||
local item = playerInv:getItemFromType("Saw") or playerInv:getItemFromType("GardenSaw") or
|
||||
@@ -160,36 +160,36 @@ end
|
||||
|
||||
-----------------------------------------
|
||||
-- MP HANDLING CHECKS
|
||||
JCIO_Common.CheckIfCanBeCut = function(partName, limbsData)
|
||||
TOC_Common.CheckIfCanBeCut = function(partName, limbsData)
|
||||
|
||||
if limbsData == nil then
|
||||
limbsData = getPlayer():getModData().JCIO.limbs
|
||||
limbsData = getPlayer():getModData().TOC.limbs
|
||||
end
|
||||
|
||||
local check = (not limbsData[partName].isCut) and
|
||||
(not JCIO_Common.CheckIfProsthesisAlreadyInstalled(limbsData, partName))
|
||||
(not TOC_Common.CheckIfProsthesisAlreadyInstalled(limbsData, partName))
|
||||
|
||||
return check
|
||||
|
||||
end
|
||||
|
||||
JCIO_Common.CheckIfCanBeOperated = function(partName, limbsData)
|
||||
TOC_Common.CheckIfCanBeOperated = function(partName, limbsData)
|
||||
|
||||
if limbsData == nil then
|
||||
limbsData = getPlayer():getModData().JCIO.limbs
|
||||
limbsData = getPlayer():getModData().TOC.limbs
|
||||
end
|
||||
|
||||
return limbsData[partName].isOperated == false and limbsData[partName].isAmputationShown
|
||||
|
||||
end
|
||||
|
||||
JCIO_Common.CheckIfProsthesisCanBeEquipped = function(partName)
|
||||
local limbs_data = getPlayer():getModData().JCIO.limbs
|
||||
TOC_Common.CheckIfProsthesisCanBeEquipped = function(partName)
|
||||
local limbs_data = getPlayer():getModData().TOC.limbs
|
||||
return limbs_data[partName].isCauterized or limbs_data[partName].isCicatrized
|
||||
-- check if prosthesis is in the surgeon inventory... we need to get it before
|
||||
end
|
||||
|
||||
JCIO_Common.CheckIfProsthesisCanBeUnequipped = function(partName)
|
||||
TOC_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
|
||||
return true
|
||||
@@ -201,11 +201,11 @@ end
|
||||
-- Various checks
|
||||
-----------------------------------------
|
||||
|
||||
JCIO_Common.CheckIfItemIsAmputatedLimb = function(item)
|
||||
TOC_Common.CheckIfItemIsAmputatedLimb = function(item)
|
||||
local itemFullType = item:getFullType()
|
||||
local check
|
||||
|
||||
if string.find(itemFullType, "JCIO.Amputation_") then
|
||||
if string.find(itemFullType, "TOC.Amputation_") then
|
||||
check = true
|
||||
else
|
||||
check = false
|
||||
@@ -232,7 +232,7 @@ function CheckIfItemIsProsthesis(item)
|
||||
|
||||
end
|
||||
|
||||
JCIO_Common.CheckIfItemIsInstalledProsthesis = function(item)
|
||||
TOC_Common.CheckIfItemIsInstalledProsthesis = function(item)
|
||||
local itemFullType = item:getFullType()
|
||||
if string.find(itemFullType, "TOC.Prost_") then
|
||||
return true
|
||||
@@ -242,9 +242,9 @@ JCIO_Common.CheckIfItemIsInstalledProsthesis = function(item)
|
||||
|
||||
end
|
||||
|
||||
JCIO_Common.CheckIfProsthesisAlreadyInstalled = function(limbsData, partName)
|
||||
TOC_Common.CheckIfProsthesisAlreadyInstalled = function(limbsData, partName)
|
||||
|
||||
for _, side in pairs(JCIO.sideNames) do
|
||||
for _, side in pairs(TOC.sideNames) do
|
||||
if string.find(partName, side) then
|
||||
return (limbsData[side .. "_Hand"].isProsthesisEquipped or limbsData[side .. "_LowerArm"].isProsthesisEquipped)
|
||||
end
|
||||
@@ -252,11 +252,11 @@ JCIO_Common.CheckIfProsthesisAlreadyInstalled = function(limbsData, partName)
|
||||
|
||||
end
|
||||
|
||||
JCIO_Common.GetCanBeHeldTable = function(limbs_data)
|
||||
TOC_Common.GetCanBeHeldTable = function(limbs_data)
|
||||
|
||||
local canBeHeld = {}
|
||||
|
||||
for _, side in pairs(JCIO.sideNames) do
|
||||
for _, side in pairs(TOC.sideNames) do
|
||||
canBeHeld[side] = true
|
||||
|
||||
if limbs_data[side .. "_Hand"].isCut then
|
||||
@@ -275,7 +275,7 @@ JCIO_Common.GetCanBeHeldTable = function(limbs_data)
|
||||
end
|
||||
-------------------------------
|
||||
|
||||
JCIO_Common.FindItemInWornItems = function(player, checkString)
|
||||
TOC_Common.FindItemInWornItems = function(player, checkString)
|
||||
local wornItems = player:getWornItems()
|
||||
|
||||
for i = 1, wornItems:size() - 1 do -- Maybe wornItems:size()-1
|
||||
|
||||
@@ -1,47 +1,47 @@
|
||||
------------------------------------------
|
||||
------------- JUST CUT IT OUT ------------
|
||||
-------------- THE ONLY CURE -------------
|
||||
------------------------------------------
|
||||
---------- COMPATIBILITY FUNCS -----------
|
||||
|
||||
|
||||
if JCIO_Compat == nil then
|
||||
JCIO_Compat = {}
|
||||
if TOC_Compat == nil then
|
||||
TOC_Compat = {}
|
||||
end
|
||||
|
||||
-- Gets the old status and turns it into the new.
|
||||
JCIO_Compat.CheckCompatibilityWithOlderVersions = function(modData)
|
||||
TOC_Compat.CheckCompatibilityWithOlderVersions = function(modData)
|
||||
|
||||
if modData.TOC ~= nil then
|
||||
print("JCIO: found old data from TOC")
|
||||
print("TOC: found old data from TOC")
|
||||
if modData.TOC.Limbs ~= nil then
|
||||
JCIO_Compat.MapOldDataToNew(modData)
|
||||
TOC_Compat.MapOldDataToNew(modData)
|
||||
modData.TOC = nil -- Deletes the old mod data stuff
|
||||
else
|
||||
print("JCIO: something is wrong, couldn't find Limbs table in old TOC modData")
|
||||
print("TOC: something is wrong, couldn't find Limbs table in old TOC modData")
|
||||
end
|
||||
else
|
||||
print("JCIO: couldn't find old TOC data")
|
||||
print("TOC: couldn't find old TOC data")
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
JCIO_Compat.MapOldDataToNew = function(modData)
|
||||
TOC_Compat.MapOldDataToNew = function(modData)
|
||||
|
||||
local oldNamesTable = { "RightHand", "RightForearm", "RightArm", "LeftHand", "LeftForearm", "LeftArm" }
|
||||
local newNamesTable = { "Right_Hand", "Right_LowerArm", "Right_UpperArm", "Left_Hand", "Left_LowerArm", "Left_UpperArm" }
|
||||
|
||||
print("JCIO: Trying to backup old data from TOC")
|
||||
print("TOC: Trying to backup old data from TOC")
|
||||
|
||||
if modData == nil then
|
||||
return
|
||||
end
|
||||
|
||||
print("JCIO: found old data from TOC")
|
||||
print("TOC: found old data from TOC")
|
||||
|
||||
|
||||
JCIO_Cheat.ResetEverything()
|
||||
TOC_Cheat.ResetEverything()
|
||||
|
||||
-- Another check just in case the user is using Mr Bounty og version. I really don't wanna map that out so let's just reset everything directly
|
||||
|
||||
@@ -51,16 +51,16 @@ JCIO_Compat.MapOldDataToNew = function(modData)
|
||||
|
||||
-- Player has the og version of the mod
|
||||
if modData.TOC.Limbs.RightHand.IsCut ~= nil then
|
||||
print("JCIO: Found TOC Beta data")
|
||||
print("TOC: Found TOC Beta data")
|
||||
compatEnum = 1
|
||||
elseif modData.TOC.Limbs.Right_Hand.is_cut ~= nil then
|
||||
print("JCIO: Found TOCBB data")
|
||||
print("TOC: Found TOCBB data")
|
||||
compatEnum = 2
|
||||
end
|
||||
|
||||
|
||||
if compatEnum == nil then
|
||||
print("JCIO: Couldn't find any compatible data that could be retrieved")
|
||||
print("TOC: Couldn't find any compatible data that could be retrieved")
|
||||
return
|
||||
end
|
||||
|
||||
@@ -107,34 +107,34 @@ JCIO_Compat.MapOldDataToNew = function(modData)
|
||||
|
||||
|
||||
-- Starts reapplying stuff
|
||||
modData.JCIO.limbs.isOtherBodypartInfected = modData.TOC.Limbs[isOtherBodypartInfectedOldKey]
|
||||
modData.TOC.limbs.isOtherBodypartInfected = modData.TOC.Limbs[isOtherBodypartInfectedOldKey]
|
||||
|
||||
for i = 1, #newNamesTable do
|
||||
|
||||
local oldName = oldNamesTable[i]
|
||||
local newName = newNamesTable[i]
|
||||
print("JCIO: isCut: " .. oldName .. " " .. tostring(modData.TOC.Limbs[oldName][isCutOldKey]))
|
||||
print("JCIO: isOperated: " .. oldName .. " " .. tostring(modData.TOC.Limbs[oldName][isOperatedOldKey]))
|
||||
print("JCIO: isCicatrized: " .. oldName .. " " .. tostring(modData.TOC.Limbs[oldName][isCicatrizedOldKey]))
|
||||
print("JCIO: isAmputationShown: " .. oldName .. " " .. tostring(modData.TOC.Limbs[oldName][isAmputationShownOldKey]))
|
||||
print("JCIO: cicatrizationTime: " .. oldName .. " " .. tostring(modData.TOC.Limbs[oldName][cicatrizationTimeOldKey]))
|
||||
print("TOC: isCut: " .. oldName .. " " .. tostring(modData.TOC.Limbs[oldName][isCutOldKey]))
|
||||
print("TOC: isOperated: " .. oldName .. " " .. tostring(modData.TOC.Limbs[oldName][isOperatedOldKey]))
|
||||
print("TOC: isCicatrized: " .. oldName .. " " .. tostring(modData.TOC.Limbs[oldName][isCicatrizedOldKey]))
|
||||
print("TOC: isAmputationShown: " .. oldName .. " " .. tostring(modData.TOC.Limbs[oldName][isAmputationShownOldKey]))
|
||||
print("TOC: cicatrizationTime: " .. oldName .. " " .. tostring(modData.TOC.Limbs[oldName][cicatrizationTimeOldKey]))
|
||||
|
||||
|
||||
modData.JCIO.limbs[newName].isCut = modData.TOC.Limbs[oldName][isCutOldKey]
|
||||
modData.TOC.limbs[newName].isCut = modData.TOC.Limbs[oldName][isCutOldKey]
|
||||
|
||||
if modData.JCIO.limbs[newName].isCut then
|
||||
print("JCIO: Found old cut limb, reapplying model")
|
||||
local cloth = getPlayer():getInventory():AddItem(JCIO_Common.FindAmputatedClothingName(newName))
|
||||
if modData.TOC.limbs[newName].isCut then
|
||||
print("TOC: Found old cut limb, reapplying model")
|
||||
local cloth = getPlayer():getInventory():AddItem(TOC_Common.FindAmputatedClothingName(newName))
|
||||
getPlayer():setWornItem(cloth:getBodyLocation(), cloth)
|
||||
end
|
||||
|
||||
|
||||
modData.JCIO.limbs[newName].isInfected = modData.TOC.Limbs[oldName][isInfectedOldKey]
|
||||
modData.JCIO.limbs[newName].isOperated = modData.TOC.Limbs[oldName][isOperatedOldKey]
|
||||
modData.JCIO.limbs[newName].isCicatrized = modData.TOC.Limbs[oldName][isCicatrizedOldKey]
|
||||
modData.JCIO.limbs[newName].isCauterized = modData.TOC.Limbs[oldName][isCauterizedOldKey]
|
||||
modData.JCIO.limbs[newName].isAmputationShown = modData.TOC.Limbs[oldName][isAmputationShownOldKey]
|
||||
modData.JCIO.limbs[newName].cicatrizationTime = modData.TOC.Limbs[oldName][cicatrizationTimeOldKey]
|
||||
modData.TOC.limbs[newName].isInfected = modData.TOC.Limbs[oldName][isInfectedOldKey]
|
||||
modData.TOC.limbs[newName].isOperated = modData.TOC.Limbs[oldName][isOperatedOldKey]
|
||||
modData.TOC.limbs[newName].isCicatrized = modData.TOC.Limbs[oldName][isCicatrizedOldKey]
|
||||
modData.TOC.limbs[newName].isCauterized = modData.TOC.Limbs[oldName][isCauterizedOldKey]
|
||||
modData.TOC.limbs[newName].isAmputationShown = modData.TOC.Limbs[oldName][isAmputationShownOldKey]
|
||||
modData.TOC.limbs[newName].cicatrizationTime = modData.TOC.Limbs[oldName][cicatrizationTimeOldKey]
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
-- TODO this needs to be moved away
|
||||
function JCIO_Common.GetKitInInventory(surgeon)
|
||||
function TOC_Common.GetKitInInventory(surgeon)
|
||||
local playerInv = surgeon:getInventory()
|
||||
local item = playerInv:getItemFromType('JCIO.Real_surgeon_kit') or playerInv:getItemFromType('JCIO.Surgeon_kit') or
|
||||
playerInv:getItemFromType('JCIO.Improvised_surgeon_kit')
|
||||
local item = playerInv:getItemFromType('TOC.Real_surgeon_kit') or playerInv:getItemFromType('TOC.Surgeon_kit') or
|
||||
playerInv:getItemFromType('TOC.Improvised_surgeon_kit')
|
||||
return item
|
||||
|
||||
end
|
||||
@@ -10,27 +10,27 @@ end
|
||||
-- Unequip Prosthesis
|
||||
|
||||
local function PartNameToBodyLocationProsthesis(name)
|
||||
if name == "Right_Hand" then return "JCIO_ArmRightProsthesis" end
|
||||
if name == "Right_LowerArm" then return "JCIO_ArmRightProsthesis" end
|
||||
if name == "Right_UpperArm" then return "JCIO_ArmRightProsthesis" end
|
||||
if name == "Left_Hand" then return "JCIO_ArmLeftProsthesis" end
|
||||
if name == "Left_LowerArm" then return "JCIO_ArmLeftProsthesis" end
|
||||
if name == "Left_UpperArm" then return "JCIO_ArmLeftProsthesis" end
|
||||
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
|
||||
if name == "Left_Hand" then return "TOC_ArmLeftProsthesis" end
|
||||
if name == "Left_LowerArm" then return "TOC_ArmLeftProsthesis" end
|
||||
if name == "Left_UpperArm" then return "TOC_ArmLeftProsthesis" end
|
||||
end
|
||||
|
||||
local function PartNameToBodyLocationAmputation(name)
|
||||
if name == "Right_Hand" then return "JCIO_ArmRight" end
|
||||
if name == "Right_LowerArm" then return "JCIO_ArmRight" end
|
||||
if name == "Right_UpperArm" then return "JCIO_ArmRight" end
|
||||
if name == "Left_Hand" then return "JCIO_ArmLeft" end
|
||||
if name == "Left_LowerArm" then return "JCIO_ArmLeft" end
|
||||
if name == "Left_UpperArm" then return "JCIO_ArmLeft" end
|
||||
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
|
||||
if name == "Left_Hand" then return "TOC_ArmLeft" end
|
||||
if name == "Left_LowerArm" then return "TOC_ArmLeft" end
|
||||
if name == "Left_UpperArm" then return "TOC_ArmLeft" end
|
||||
|
||||
if name == "Left_Foot" then return "JCIO_LegLeft" end
|
||||
if name == "Right_Foot" then return "JCIO_LegRight" end
|
||||
if name == "Left_Foot" then return "TOC_LegLeft" end
|
||||
if name == "Right_Foot" then return "TOC_LegRight" end
|
||||
end
|
||||
|
||||
function JCIO_Common.FindItemInProstBodyLocation(partName, patient)
|
||||
function TOC_Common.FindItemInProstBodyLocation(partName, patient)
|
||||
-- Can't be used for online purposes, since we can't get the online inventory of another player
|
||||
local wornItems = patient:getWornItems()
|
||||
|
||||
@@ -45,7 +45,7 @@ function JCIO_Common.FindItemInProstBodyLocation(partName, patient)
|
||||
end
|
||||
|
||||
-- Debug cheat and update every minute for cicatrization
|
||||
function JCIO_Common.FindAmputationOrProsthesisName(partName, player, choice)
|
||||
function TOC_Common.FindAmputationOrProsthesisName(partName, player, choice)
|
||||
local wornItems = player:getWornItems()
|
||||
for i = 1, wornItems:size() - 1 do
|
||||
local item = wornItems:get(i):getItem()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
------------------------------------------
|
||||
------------- JUST CUT IT OUT ------------
|
||||
-------------- THE ONLY CURE -------------
|
||||
------------------------------------------
|
||||
------------- INIT FUNCTIONS -------------
|
||||
--[[
|
||||
@@ -8,7 +8,7 @@ Rewritten by: Pao
|
||||
--]]
|
||||
|
||||
|
||||
JCIO.InitializeTraits = function()
|
||||
TOC.InitializeTraits = function()
|
||||
local amp1 = TraitFactory.addTrait("Amputee_Hand", getText("UI_trait_Amputee_Hand"), -8,
|
||||
getText("UI_trait_Amputee_Hand_desc"), false, false)
|
||||
amp1:addXPBoost(Perks.Left_Hand, 4)
|
||||
@@ -35,12 +35,12 @@ JCIO.InitializeTraits = function()
|
||||
end
|
||||
-- TODO Refactor this
|
||||
|
||||
JCIO.CutLimbForTrait = function(player, jcioModData, partName)
|
||||
TOC.CutLimbForTrait = function(player, TOCModData, partName)
|
||||
|
||||
local limbsData = jcioModData.limbs
|
||||
local limbsData = TOCModData.limbs
|
||||
|
||||
local amputationClothingItem = player:getInventory():AddItem("JCIO.Amputation_" .. partName)
|
||||
JCIO_Visuals.SetTextureForAmputation(amputationClothingItem, player, true)
|
||||
local amputationClothingItem = player:getInventory():AddItem("TOC.Amputation_" .. partName)
|
||||
TOC_Visuals.SetTextureForAmputation(amputationClothingItem, player, true)
|
||||
|
||||
player:setWornItem(amputationClothingItem:getBodyLocation(), amputationClothingItem)
|
||||
limbsData[partName].isCut = true
|
||||
@@ -48,7 +48,7 @@ JCIO.CutLimbForTrait = function(player, jcioModData, partName)
|
||||
limbsData[partName].isAmputationShown = true
|
||||
limbsData[partName].isCicatrized = true
|
||||
|
||||
for _, v in pairs(JCIO.limbParameters[partName].dependsOn) do
|
||||
for _, v in pairs(TOC.limbParameters[partName].dependsOn) do
|
||||
limbsData[v].isCut = true
|
||||
limbsData[v].isOperated = true
|
||||
limbsData[v].isAmputationShown = false
|
||||
@@ -56,7 +56,7 @@ JCIO.CutLimbForTrait = function(player, jcioModData, partName)
|
||||
end
|
||||
end
|
||||
|
||||
JCIO.InitPart = function(limbsData, partName)
|
||||
TOC.InitPart = function(limbsData, partName)
|
||||
|
||||
limbsData[partName].isCut = false
|
||||
limbsData[partName].isInfected = false
|
||||
@@ -72,8 +72,8 @@ JCIO.InitPart = function(limbsData, partName)
|
||||
|
||||
end
|
||||
|
||||
JCIO.SetInitData = function(modData, player)
|
||||
print("JCIO: Creating mod_data.JCIO")
|
||||
TOC.SetInitData = function(modData, player)
|
||||
print("TOC: Creating mod_data.TOC")
|
||||
--------
|
||||
-- NEW NAMING SCHEME
|
||||
|
||||
@@ -94,10 +94,10 @@ JCIO.SetInitData = function(modData, player)
|
||||
-- TODO Move prosthesis to something more easily accessible
|
||||
-- TODO Acceptable prosthesis need to be moved to something more accessible
|
||||
|
||||
modData.JCIO = {}
|
||||
modData.TOC = {}
|
||||
|
||||
-- Limbs
|
||||
modData.JCIO.limbs = {
|
||||
modData.TOC.limbs = {
|
||||
Right_Hand = {},
|
||||
Right_LowerArm = {},
|
||||
Right_UpperArm = {},
|
||||
@@ -114,7 +114,7 @@ JCIO.SetInitData = function(modData, player)
|
||||
|
||||
-- TODO Move this to the global TOC thing
|
||||
-- Prosthetics
|
||||
modData.JCIO.prosthesis = {
|
||||
modData.TOC.prosthesis = {
|
||||
WoodenHook = {
|
||||
Right_Hand = {},
|
||||
Right_LowerArm = {},
|
||||
@@ -151,42 +151,42 @@ JCIO.SetInitData = function(modData, player)
|
||||
|
||||
-- TODO Move this to the global TOC thing
|
||||
-- Generic (future uses)
|
||||
modData.JCIO.generic = {}
|
||||
modData.TOC.generic = {}
|
||||
|
||||
|
||||
for _, side in pairs(JCIO.sideNames) do
|
||||
for _, limb in pairs(JCIO.limbNames) do
|
||||
for _, side in pairs(TOC.sideNames) do
|
||||
for _, limb in pairs(TOC.limbNames) do
|
||||
local partName = side .. "_" .. limb
|
||||
JCIO.InitPart(modData.JCIO.limbs, partName)
|
||||
TOC.InitPart(modData.TOC.limbs, partName)
|
||||
end
|
||||
end
|
||||
|
||||
-- Setup traits
|
||||
if player:HasTrait("Amputee_Hand") then
|
||||
JCIO.CutLimbForTrait(player, modData.JCIO, "Left_Hand")
|
||||
TOC.CutLimbForTrait(player, modData.TOC, "Left_Hand")
|
||||
elseif player:HasTrait("Amputee_LowerArm") then
|
||||
JCIO.CutLimbForTrait(player, modData.JCIO, "Left_LowerArm")
|
||||
TOC.CutLimbForTrait(player, modData.TOC, "Left_LowerArm")
|
||||
elseif player:HasTrait("Amputee_UpperArm") then
|
||||
JCIO.CutLimbForTrait(player, modData.JCIO, "Left_UpperArm")
|
||||
TOC.CutLimbForTrait(player, modData.TOC, "Left_UpperArm")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
JCIO.Init = function(_, player)
|
||||
TOC.Init = function(_, player)
|
||||
|
||||
local modData = player:getModData()
|
||||
if modData.JCIO == nil then
|
||||
JCIO.SetInitData(modData, player)
|
||||
if modData.TOC == nil then
|
||||
TOC.SetInitData(modData, player)
|
||||
else
|
||||
JCIO_Compat.CheckCompatibilityWithOlderVersions(modData)
|
||||
JCIO_Anims.CheckAndSetMissingFootAnims(modData)
|
||||
TOC_Compat.CheckCompatibilityWithOlderVersions(modData)
|
||||
TOC_Anims.CheckAndSetMissingFootAnims(modData)
|
||||
|
||||
end
|
||||
|
||||
-- Compat fix with older versions
|
||||
if modData.TOC ~= nil then
|
||||
print("JCIO: found older data from TOC or TOCBB")
|
||||
JCIO_Compat.CheckCompatibilityWithOlderVersions(modData)
|
||||
print("TOC: found older data from TOC or TOCBB")
|
||||
TOC_Compat.CheckCompatibilityWithOlderVersions(modData)
|
||||
end
|
||||
|
||||
end
|
||||
@@ -196,33 +196,33 @@ end
|
||||
-- Rewrite 2 Electirc Bogaloo
|
||||
local function InitializeJustCutItOff()
|
||||
|
||||
if not JCIO then
|
||||
JCIO = {}
|
||||
if not TOC then
|
||||
TOC = {}
|
||||
end
|
||||
|
||||
|
||||
-- Initializes static values in a global table
|
||||
JCIO.sideNames = {"Left", "Right"}
|
||||
JCIO.limbNames = { "Hand", "LowerArm", "UpperArm", "Foot"}
|
||||
TOC.sideNames = {"Left", "Right"}
|
||||
TOC.limbNames = { "Hand", "LowerArm", "UpperArm", "Foot"}
|
||||
|
||||
JCIO.limbParameters = {}
|
||||
for _, side in pairs(JCIO.sideNames) do
|
||||
for _, limb in pairs(JCIO.limbNames) do
|
||||
TOC.limbParameters = {}
|
||||
for _, side in pairs(TOC.sideNames) do
|
||||
for _, limb in pairs(TOC.limbNames) do
|
||||
local partName = side .. "_" .. limb
|
||||
JCIO.limbParameters[partName] = {}
|
||||
TOC.limbParameters[partName] = {}
|
||||
|
||||
if limb == "Hand" then
|
||||
JCIO.limbParameters[partName].cicatrizationBaseTime = 1700
|
||||
JCIO.limbParameters[partName].dependsOn = {}
|
||||
TOC.limbParameters[partName].cicatrizationBaseTime = 1700
|
||||
TOC.limbParameters[partName].dependsOn = {}
|
||||
elseif limb == "LowerArm" then
|
||||
JCIO.limbParameters[partName].cicatrizationBaseTime = 1800
|
||||
JCIO.limbParameters[partName].dependsOn = { side .. "_Hand", }
|
||||
TOC.limbParameters[partName].cicatrizationBaseTime = 1800
|
||||
TOC.limbParameters[partName].dependsOn = { side .. "_Hand", }
|
||||
elseif limb == "UpperArm" then
|
||||
JCIO.limbParameters[partName].cicatrizationBaseTime = 2000
|
||||
JCIO.limbParameters[partName].dependsOn = { side .. "_Hand", side .. "_LowerArm", }
|
||||
TOC.limbParameters[partName].cicatrizationBaseTime = 2000
|
||||
TOC.limbParameters[partName].dependsOn = { side .. "_Hand", side .. "_LowerArm", }
|
||||
elseif limb == "Foot" then
|
||||
JCIO.limbParameters[partName].cicatrizationBaseTime = 1700
|
||||
JCIO.limbParameters[partName].dependsOn = {}
|
||||
TOC.limbParameters[partName].cicatrizationBaseTime = 1700
|
||||
TOC.limbParameters[partName].dependsOn = {}
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -230,18 +230,18 @@ local function InitializeJustCutItOff()
|
||||
|
||||
--------------------------
|
||||
|
||||
JCIO.InitializeTraits()
|
||||
Events.OnCreatePlayer.Add(JCIO.Init)
|
||||
TOC.InitializeTraits()
|
||||
Events.OnCreatePlayer.Add(TOC.Init)
|
||||
|
||||
-- Setup updates
|
||||
Events.OnTick.Add(JCIO.UpdateOnTick)
|
||||
Events.EveryTenMinutes.Add(JCIO.UpdateEveryTenMinutes)
|
||||
Events.EveryOneMinute.Add(JCIO.UpdateEveryOneMinute)
|
||||
Events.OnTick.Add(TOC.UpdateOnTick)
|
||||
Events.EveryTenMinutes.Add(TOC.UpdateEveryTenMinutes)
|
||||
Events.EveryOneMinute.Add(TOC.UpdateEveryOneMinute)
|
||||
|
||||
|
||||
-- Mod Checker
|
||||
CheckMyModTable = CheckMyModTable or {}
|
||||
CheckMyModTable["JCIO"] = 2915572347
|
||||
CheckMyModTable["TOC"] = 2915572347
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
------------------------------------------
|
||||
------------- JUST CUT IT OUT ------------
|
||||
-------------- THE ONLY CURE -------------
|
||||
------------------------------------------
|
||||
|
||||
------------------------------------------
|
||||
@@ -16,8 +16,8 @@ local function SetCompatibilityFancyHandwork()
|
||||
local secondary = self.chr:getSecondaryHandItem()
|
||||
local equip = true
|
||||
|
||||
local limbsData = getPlayer():getModData().JCIO.limbs
|
||||
local canBeHeld = JCIO_Common.GetCanBeHeldTable(limbsData)
|
||||
local limbsData = getPlayer():getModData().TOC.limbs
|
||||
local canBeHeld = TOC_Common.GetCanBeHeldTable(limbsData)
|
||||
|
||||
|
||||
-- If we already have the item equipped
|
||||
@@ -35,7 +35,7 @@ local function SetCompatibilityFancyHandwork()
|
||||
equip = false
|
||||
end
|
||||
if mod then
|
||||
--print("JCIO: Fancy Handwork modifier")
|
||||
--print("TOC: Fancy Handwork modifier")
|
||||
-- If we still have something equipped in secondary, unequip
|
||||
if secondary and equip and canBeHeld["Left"] then
|
||||
ISTimedActionQueue.add(ISUnequipAction:new(self.chr, secondary, 20))
|
||||
@@ -70,8 +70,8 @@ local function SetCompatibilityFancyHandwork()
|
||||
|
||||
|
||||
function FHSwapHandsAction:isValid()
|
||||
local limbsData = getPlayer():getModData().JCIO.limbs
|
||||
local canBeHeld = JCIO_Common.GetCanBeHeldTable(limbsData)
|
||||
local limbsData = getPlayer():getModData().TOC.limbs
|
||||
local canBeHeld = TOC_Common.GetCanBeHeldTable(limbsData)
|
||||
|
||||
return (canBeHeld["Right"] and canBeHeld["Left"]) and(((self.character:getPrimaryHandItem() or self.character:getSecondaryHandItem()) ~= nil))
|
||||
end
|
||||
@@ -89,8 +89,8 @@ local function SetCompatibilityFancyHandWorkAndSwapIt()
|
||||
local secondary = self.chr:getSecondaryHandItem()
|
||||
local equip = true
|
||||
|
||||
local limbsData = getPlayer():getModData().JCIO.limbs
|
||||
local canBeHeld = JCIO_Common.GetCanBeHeldTable(limbsData)
|
||||
local limbsData = getPlayer():getModData().TOC.limbs
|
||||
local canBeHeld = TOC_Common.GetCanBeHeldTable(limbsData)
|
||||
|
||||
-- If we already have the item equipped
|
||||
if (primary and primary == item) or (secondary and secondary == item) then
|
||||
@@ -107,7 +107,7 @@ local function SetCompatibilityFancyHandWorkAndSwapIt()
|
||||
equip = false
|
||||
end
|
||||
if mod then
|
||||
--print("JCIO: Fancy Handwork modifier")
|
||||
--print("TOC: Fancy Handwork modifier")
|
||||
-- If we still have something equipped in secondary, unequip
|
||||
if secondary and equip and canBeHeld["Left"] then
|
||||
ISTimedActionQueue.add(ISUnequipAction:new(self.chr, secondary, 20))
|
||||
@@ -157,22 +157,22 @@ end
|
||||
|
||||
local function CheckModCompatibility()
|
||||
local activatedMods = getActivatedMods()
|
||||
print("JCIO: Checking mods")
|
||||
print("TOC: Checking mods")
|
||||
|
||||
if activatedMods:contains("FancyHandwork") then
|
||||
|
||||
if activatedMods:contains("SwapIt") then
|
||||
require "SwapIt Main"
|
||||
print("JCIO: Overriding FancyHandwork and SwapIt methods")
|
||||
print("TOC: Overriding FancyHandwork and SwapIt methods")
|
||||
SetCompatibilityFancyHandWorkAndSwapIt()
|
||||
else
|
||||
print("JCIO: Overriding FancyHandwork methods")
|
||||
print("TOC: Overriding FancyHandwork methods")
|
||||
require "TimedActions/FHSwapHandsAction"
|
||||
SetCompatibilityFancyHandwork()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
print("JCIO: Starting CheckModCompatibility")
|
||||
print("TOC: Starting CheckModCompatibility")
|
||||
Events.OnGameStart.Add(CheckModCompatibility)
|
||||
|
||||
|
||||
@@ -19,13 +19,13 @@ function ISBaseTimedAction:adjustMaxTime(maxTime)
|
||||
|
||||
local modData = getPlayer():getModData()
|
||||
|
||||
local limbParameters = JCIO.limbParameters
|
||||
local limbsData = modData.JCIO.limbs
|
||||
local limbParameters = TOC.limbParameters
|
||||
local limbsData = modData.TOC.limbs
|
||||
|
||||
local modifiedMaxTime = originalMaxTime
|
||||
local burnFactor = 1.3 -- TODO Move this crap
|
||||
|
||||
for _, partName in pairs(JCIO_Common.GetPartNames()) do
|
||||
for _, partName in pairs(TOC_Common.GetPartNames()) do
|
||||
if limbsData[partName].isCut then
|
||||
|
||||
|
||||
@@ -79,8 +79,8 @@ function ISInventoryPane:onMouseDoubleClick(x, y)
|
||||
|
||||
if instanceof(item_to_check, "InventoryItem") then
|
||||
og_ISInventoryPaneOnMouseDoubleClick(self, x, y)
|
||||
elseif JCIO_Common.CheckIfItemIsAmputatedLimb(item_to_check.items[1]) or JCIO_Common.CheckIfItemIsInstalledProsthesis(item_to_check.items[1]) then
|
||||
--print("JCIO: Can't double click this item")
|
||||
elseif TOC_Common.CheckIfItemIsAmputatedLimb(item_to_check.items[1]) or TOC_Common.CheckIfItemIsInstalledProsthesis(item_to_check.items[1]) then
|
||||
--print("TOC: Can't double click this item")
|
||||
|
||||
end
|
||||
og_ISInventoryPaneOnMouseDoubleClick(self, x, y)
|
||||
@@ -110,8 +110,8 @@ ISInventoryPaneContextMenu.onInspectClothing = function(playerObj, cloth
|
||||
|
||||
-- Inspect menu bypasses getActualItems, so we need to add that workaround here too
|
||||
local clothing_full_type = clothing:getFullType()
|
||||
if JCIO_Common.CheckIfItemIsAmputatedLimb(clothing) or JCIO_Common.CheckIfItemIsInstalledProsthesis(clothing) then
|
||||
--print("JCIO: Can't inspect this!")
|
||||
if TOC_Common.CheckIfItemIsAmputatedLimb(clothing) or TOC_Common.CheckIfItemIsInstalledProsthesis(clothing) then
|
||||
--print("TOC: Can't inspect this!")
|
||||
else
|
||||
og_ISInventoryPaneContextMenuOnInspectClothing(playerObj, clothing)
|
||||
|
||||
@@ -126,8 +126,8 @@ function ISEquipWeaponAction:perform()
|
||||
--TODO Block it before even performing
|
||||
-- TODO in the inventory menu there is something broken, even though this works
|
||||
og_ISEquipWeaponActionPerform(self)
|
||||
local limbs_data = self.character:getModData().JCIO.limbs
|
||||
local can_be_held = JCIO_Common.GetCanBeHeldTable(limbs_data)
|
||||
local limbs_data = self.character:getModData().TOC.limbs
|
||||
local can_be_held = TOC_Common.GetCanBeHeldTable(limbs_data)
|
||||
|
||||
|
||||
if not self.item:isRequiresEquippedBothHands() then
|
||||
@@ -173,7 +173,7 @@ function ISInventoryPaneContextMenu.unequipItem(item, player)
|
||||
if item == nil then
|
||||
return
|
||||
end
|
||||
if JCIO_Common.CheckIfItemIsAmputatedLimb(item) == false and JCIO_Common.CheckIfItemIsInstalledProsthesis(item) == false then
|
||||
if TOC_Common.CheckIfItemIsAmputatedLimb(item) == false and TOC_Common.CheckIfItemIsInstalledProsthesis(item) == false then
|
||||
og_ISInventoryPaneContextMenuUnequipItem(item, player)
|
||||
end
|
||||
end
|
||||
@@ -181,7 +181,7 @@ end
|
||||
local og_ISInventoryPaneContextMenuDropItem = ISInventoryPaneContextMenu.dropItem
|
||||
function ISInventoryPaneContextMenu.dropItem(item, player)
|
||||
|
||||
if JCIO_Common.CheckIfItemIsAmputatedLimb(item) == false and JCIO_Common.CheckIfItemIsInstalledProsthesis(item) == false then
|
||||
if TOC_Common.CheckIfItemIsAmputatedLimb(item) == false and TOC_Common.CheckIfItemIsInstalledProsthesis(item) == false then
|
||||
og_ISInventoryPaneContextMenuDropItem(item, player)
|
||||
end
|
||||
|
||||
@@ -193,10 +193,10 @@ function ISWearClothing:isValid()
|
||||
|
||||
local baseCheck = og_ISWearClothingIsValid(self)
|
||||
local itemFullType = self.item:getFullType()
|
||||
local limbsData = self.character:getModData().JCIO.limbs
|
||||
local limbsData = self.character:getModData().TOC.limbs
|
||||
|
||||
local itemToCheck = "Surgery_%s_Tourniquet"
|
||||
for _, side in pairs(JCIO.sideNames) do
|
||||
for _, side in pairs(TOC.sideNames) do
|
||||
|
||||
local formattedItemName = string.format(itemToCheck, side)
|
||||
|
||||
@@ -224,15 +224,15 @@ function ISClothingExtraAction:isValid()
|
||||
local location = newItem:getBodyLocation()
|
||||
|
||||
|
||||
--print("JCIO: watch full type " .. itemFullType)
|
||||
--print("JCIO: watch location " .. location)
|
||||
--print("TOC: watch full type " .. itemFullType)
|
||||
--print("TOC: watch location " .. location)
|
||||
|
||||
local itemToCheck = "Watch_"
|
||||
local limbsData = self.character:getModData().JCIO.limbs
|
||||
local limbsData = self.character:getModData().TOC.limbs
|
||||
|
||||
if string.find(itemFullType, itemToCheck) then
|
||||
|
||||
for _, side in pairs (JCIO.sideNames) do
|
||||
for _, side in pairs (TOC.sideNames) do
|
||||
|
||||
if location == side .. "Wrist" then
|
||||
if limbsData[side .. "_LowerArm"].isCut then
|
||||
|
||||
@@ -70,7 +70,7 @@ function GenerateEquippedProsthesis(prosthesisItem, inventory, limb)
|
||||
|
||||
-- Check the item mod data if the values are different than the default values
|
||||
|
||||
if itemModData.JCIO ~= nil then
|
||||
if itemModData.TOC ~= nil then
|
||||
durabilityBase = itemModData.baseDurability
|
||||
durabilityTop = itemModData.topDurability
|
||||
-- else
|
||||
@@ -81,7 +81,7 @@ function GenerateEquippedProsthesis(prosthesisItem, inventory, limb)
|
||||
local equippedProsthesis = inventory:AddItem(prosthesisName)
|
||||
equippedProsthesis:setCondition(prosthesisItem:getCondition())
|
||||
|
||||
equippedProsthesis:getModData().JCIO = {
|
||||
equippedProsthesis:getModData().TOC = {
|
||||
baseDurability = durabilityBase,
|
||||
topDurability = durabilityTop,
|
||||
}
|
||||
@@ -119,7 +119,7 @@ function ProsthesisRecipes.OnCreateProsthesis(items, result, player, selectedIte
|
||||
-- Set mod data for item with durability and all that crap
|
||||
|
||||
-- Get condition from the items
|
||||
print("JCIO: setting stats for prosthesis item")
|
||||
print("TOC: setting stats for prosthesis item")
|
||||
local condition = 0
|
||||
for i=1,items:size() do
|
||||
local item = items:get(i-1)
|
||||
@@ -128,7 +128,7 @@ function ProsthesisRecipes.OnCreateProsthesis(items, result, player, selectedIte
|
||||
|
||||
result:setCondition(condition) -- Should be the sum?
|
||||
|
||||
result:getModData().JCIO = {
|
||||
result:getModData().TOC = {
|
||||
baseDurability = 100,
|
||||
topDurability = 100, -- Stores it here too so we can re-reference it for later
|
||||
}
|
||||
@@ -140,7 +140,7 @@ end
|
||||
function ProsthesisRecipes.OnDisassembleProsthesis(item, resultItems, player, selectedItem)
|
||||
|
||||
-- Check durability of original item
|
||||
local itemModData = item.getModData().JCIO
|
||||
local itemModData = item.getModData().TOC
|
||||
|
||||
local durabilityTop = itemModData.top.durability
|
||||
local durabilityBase = itemModData.base.durability
|
||||
@@ -156,16 +156,16 @@ function ProsthesisRecipes.OnDisassembleProsthesis(item, resultItems, player, se
|
||||
local baseName = GetProsthesisPartName(baseTable, prosthesisItemName)
|
||||
local topName = GetProsthesisPartName(topTable, prosthesisItemName)
|
||||
|
||||
print("JCIO: " .. baseName .. " and " .. topName)
|
||||
print("TOC: " .. baseName .. " and " .. topName)
|
||||
|
||||
local playerInv = player:getInventory()
|
||||
|
||||
local partBase = playerInv:AddItem("JCIO.ProstPart" .. baseName)
|
||||
local partBase = playerInv:AddItem("TOC.ProstPart" .. baseName)
|
||||
partBase:setCondition(durabilityBase)
|
||||
|
||||
|
||||
|
||||
local partTop = playerInv:AddItem("JCIO.ProstPart" .. topName)
|
||||
local partTop = playerInv:AddItem("TOC.ProstPart" .. topName)
|
||||
partTop:setCondition(durabilityTop)
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
------------------------------------------
|
||||
------------- JUST CUT IT OUT ------------
|
||||
-------------- THE ONLY CURE -------------
|
||||
------------------------------------------
|
||||
------------- SERVER COMMANDS ------------
|
||||
|
||||
@@ -8,14 +8,14 @@ local ServerCommands = {}
|
||||
ServerCommands.ResponseCanAct = function(arg)
|
||||
|
||||
|
||||
print("JCIO: ResponseCanAct")
|
||||
print("TOC: ResponseCanAct")
|
||||
local ui = GetConfirmUIMP()
|
||||
ui.responseReceive = true
|
||||
ui.responseAction = arg["toSend"][2]
|
||||
ui.responsePartName = arg["toSend"][1]
|
||||
ui.responseCan = arg["toSend"][3]
|
||||
ui.responseUserName = getPlayerByOnlineID(arg["From"]):getUsername()
|
||||
ui.responseActionIsBitten = getPlayerByOnlineID(arg["From"]):getBodyDamage():getBodyPart(JCIO_Common.GetBodyPartFromPartName(ui
|
||||
ui.responseActionIsBitten = getPlayerByOnlineID(arg["From"]):getBodyDamage():getBodyPart(TOC_Common.GetBodyPartFromPartName(ui
|
||||
.responsePartName)):bitten()
|
||||
end
|
||||
|
||||
@@ -27,8 +27,8 @@ ServerCommands.CanCutLimb = function(arg)
|
||||
arg["To"] = arg["From"]
|
||||
arg["From"] = getPlayer():getOnlineID()
|
||||
arg["command"] = "ResponseCanAct"
|
||||
arg["toSend"] = { partName, "Cut", JCIO_Common.CheckIfCanBeCut(partName) }
|
||||
sendClientCommand("JCIO", "SendServer", arg)
|
||||
arg["toSend"] = { partName, "Cut", TOC_Common.CheckIfCanBeCut(partName) }
|
||||
sendClientCommand("TOC", "SendServer", arg)
|
||||
end
|
||||
ServerCommands.CutLimb = function(arg)
|
||||
local data = arg["toSend"]
|
||||
@@ -39,7 +39,7 @@ ServerCommands.CutLimb = function(arg)
|
||||
local painkillerTable = data[4]
|
||||
|
||||
|
||||
JCIO.CutLimb(partName, surgeonFactor, bandageTable, painkillerTable)
|
||||
TOC.CutLimb(partName, surgeonFactor, bandageTable, painkillerTable)
|
||||
end
|
||||
|
||||
|
||||
@@ -49,8 +49,8 @@ ServerCommands.CanOperateLimb = function(arg)
|
||||
arg["To"] = arg["From"]
|
||||
arg["From"] = getPlayer():getOnlineID()
|
||||
arg["command"] = "ResponseCanAct"
|
||||
arg["toSend"] = { partName, "Operate", JCIO_Common.CheckIfCanBeOperated(partName) }
|
||||
sendClientCommand("JCIO", "SendServer", arg)
|
||||
arg["toSend"] = { partName, "Operate", TOC_Common.CheckIfCanBeOperated(partName) }
|
||||
sendClientCommand("TOC", "SendServer", arg)
|
||||
end
|
||||
ServerCommands.OperateLimb = function(arg)
|
||||
|
||||
@@ -60,7 +60,7 @@ ServerCommands.OperateLimb = function(arg)
|
||||
local surgeonFactor = data[2]
|
||||
local useOven = data[3]
|
||||
|
||||
JCIO.OperateLimb(partName, surgeonFactor, useOven)
|
||||
TOC.OperateLimb(partName, surgeonFactor, useOven)
|
||||
end
|
||||
|
||||
|
||||
@@ -71,8 +71,8 @@ ServerCommands.CanEquipProsthesis = function(arg)
|
||||
arg["To"] = arg["From"]
|
||||
arg["From"] = getPlayer():getOnlineID()
|
||||
arg["command"] = "ResponseCanAct"
|
||||
arg["toSend"] = {partName, "Equip", JCIO_Common.CheckIfProsthesisCanBeEquipped(partName) }
|
||||
sendClientCommand("JCIO", "SendServer", arg)
|
||||
arg["toSend"] = {partName, "Equip", TOC_Common.CheckIfProsthesisCanBeEquipped(partName) }
|
||||
sendClientCommand("TOC", "SendServer", arg)
|
||||
|
||||
end
|
||||
ServerCommands.EquipProsthesis = function(arg)
|
||||
@@ -86,7 +86,7 @@ ServerCommands.EquipProsthesis = function(arg)
|
||||
local partName = data[1]
|
||||
local prosthesisItem = data[2]
|
||||
|
||||
JCIO.EquipProsthesis(partName, prosthesisItem, _) -- TODO Add the third param when modular prost are done
|
||||
TOC.EquipProsthesis(partName, prosthesisItem, _) -- TODO Add the third param when modular prost are done
|
||||
|
||||
end
|
||||
|
||||
@@ -96,8 +96,8 @@ ServerCommands.CanUnequipProsthesis = function(arg)
|
||||
arg["To"] = arg["From"]
|
||||
arg["From"] = getPlayer():getOnlineID()
|
||||
arg["command"] = "ResponseCanAct"
|
||||
arg["toSend"] = { partName, "Unequip", JCIO_Common.CheckIfProsthesisCanBeUnequipped(partName)}
|
||||
sendClientCommand("JCIO", "SendServer", arg)
|
||||
arg["toSend"] = { partName, "Unequip", TOC_Common.CheckIfProsthesisCanBeUnequipped(partName)}
|
||||
sendClientCommand("TOC", "SendServer", arg)
|
||||
end
|
||||
ServerCommands.UnequipProsthesis = function(arg)
|
||||
local data = arg["toSend"]
|
||||
@@ -106,7 +106,7 @@ ServerCommands.UnequipProsthesis = function(arg)
|
||||
local partName = data[2]
|
||||
local equippedProsthesis = data[3]
|
||||
|
||||
JCIO.UnequipProsthesis(patient, partName, equippedProsthesis)
|
||||
TOC.UnequipProsthesis(patient, partName, equippedProsthesis)
|
||||
|
||||
end
|
||||
|
||||
@@ -118,10 +118,10 @@ ServerCommands.CanResetEverything = function(arg)
|
||||
arg["From"] = getPlayer():getOnlineID()
|
||||
arg["command"] = "ResponseCanAct"
|
||||
arg["toSend"] = { partName, "Cut", true }
|
||||
sendClientCommand("JCIO", "SendServer", arg)
|
||||
sendClientCommand("TOC", "SendServer", arg)
|
||||
end
|
||||
ServerCommands.ResetEverything = function(_)
|
||||
JCIO_Cheat.ResetEverything()
|
||||
TOC_Cheat.ResetEverything()
|
||||
end
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ end
|
||||
ServerCommands.AcceptDamageOtherPlayer = function(arg)
|
||||
local patient = getPlayerByOnlineID(arg[1])
|
||||
local partName = arg[2]
|
||||
JCIO.DamagePlayerDuringAmputation(patient, partName)
|
||||
TOC.DamagePlayerDuringAmputation(patient, partName)
|
||||
end
|
||||
|
||||
-- Used to propagate animation changes after amputating a foot
|
||||
@@ -153,8 +153,8 @@ end
|
||||
|
||||
|
||||
local function OnServerCommand(module, command, args)
|
||||
if module == 'JCIO' then
|
||||
print("JCIO: On JCIO Server Command " .. command)
|
||||
if module == 'TOC' then
|
||||
print("TOC: On TOC Server Command " .. command)
|
||||
if ServerCommands[command] then
|
||||
print("Found command, executing it now")
|
||||
args = args or {}
|
||||
@@ -181,7 +181,7 @@ end
|
||||
Events.OnReceiveGlobalModData.Add(OnReceiveGlobalModData)
|
||||
|
||||
local function OnConnected()
|
||||
ModData.request("JCIO_PLAYER_DATA")
|
||||
ModData.request("TOC_PLAYER_DATA")
|
||||
end
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ function SendCutLimb(player, partName, surgeonFactor, bandageTable, painkillerTa
|
||||
|
||||
-- TODO Hotfix for sound, fix this later
|
||||
arg["toSend"] = {partName, surgeonFactor, bandageTable, painkillerTable}
|
||||
sendClientCommand("JCIO", "SendServer", arg)
|
||||
sendClientCommand("TOC", "SendServer", arg)
|
||||
end
|
||||
|
||||
function SendOperateLimb(player, partName, surgeonFactor, useOven)
|
||||
@@ -209,7 +209,7 @@ function SendOperateLimb(player, partName, surgeonFactor, useOven)
|
||||
arg["To"] = player:getOnlineID()
|
||||
arg["command"] = "OperateLimb"
|
||||
arg["toSend"] = { partName, surgeonFactor, useOven }
|
||||
sendClientCommand("JCIO", "SendServer", arg)
|
||||
sendClientCommand("TOC", "SendServer", arg)
|
||||
end
|
||||
|
||||
function SendEquipProsthesis(player, partName, item, prosthesisBaseName)
|
||||
@@ -218,7 +218,7 @@ function SendEquipProsthesis(player, partName, item, prosthesisBaseName)
|
||||
arg["To"] = player:getOnlineID()
|
||||
arg["command"] = "EquipProsthesis"
|
||||
arg["toSend"] = { partName, item, prosthesisBaseName}
|
||||
sendClientCommand("JCIO", "SendServer", arg)
|
||||
sendClientCommand("TOC", "SendServer", arg)
|
||||
end
|
||||
|
||||
function SendUnequipProsthesis(player, partName, item)
|
||||
@@ -227,7 +227,7 @@ function SendUnequipProsthesis(player, partName, item)
|
||||
arg["To"] = player:getOnlineID()
|
||||
arg["command"] = "UnequipProsthesis"
|
||||
arg["toSend"] = { player, partName, item}
|
||||
sendClientCommand("JCIO", "SendServer", arg)
|
||||
sendClientCommand("TOC", "SendServer", arg)
|
||||
end
|
||||
|
||||
function AskCanCutLimb(player, partName)
|
||||
@@ -237,7 +237,7 @@ function AskCanCutLimb(player, partName)
|
||||
arg["To"] = player:getOnlineID()
|
||||
arg["command"] = "CanCutLimb"
|
||||
arg["toSend"] = partName
|
||||
sendClientCommand("JCIO", "SendServer", arg)
|
||||
sendClientCommand("TOC", "SendServer", arg)
|
||||
end
|
||||
|
||||
function AskCanOperateLimb(player, partName)
|
||||
@@ -247,7 +247,7 @@ function AskCanOperateLimb(player, partName)
|
||||
arg["To"] = player:getOnlineID()
|
||||
arg["command"] = "CanOperateLimb"
|
||||
arg["toSend"] = partName
|
||||
sendClientCommand("JCIO", "SendServer", arg)
|
||||
sendClientCommand("TOC", "SendServer", arg)
|
||||
end
|
||||
|
||||
function AskCanEquipProsthesis(player, partName)
|
||||
@@ -258,7 +258,7 @@ function AskCanEquipProsthesis(player, partName)
|
||||
arg["command"] = "CanEquipProsthesis"
|
||||
arg["toSend"] = partName -- TODO to be more precise there should be prosthesis item here too to check
|
||||
|
||||
sendClientCommand("JCIO", "SendServer", arg)
|
||||
sendClientCommand("TOC", "SendServer", arg)
|
||||
end
|
||||
|
||||
function AskCanUnequipProsthesis(player, partName)
|
||||
@@ -269,5 +269,5 @@ function AskCanUnequipProsthesis(player, partName)
|
||||
arg["command"] = "CanUnequipProsthesis"
|
||||
arg["toSend"] = partName
|
||||
|
||||
sendClientCommand("JCIO", "SendServer", arg)
|
||||
sendClientCommand("TOC", "SendServer", arg)
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
------------------------------------------
|
||||
------------- JUST CUT IT OUT ------------
|
||||
-------------- THE ONLY CURE -------------
|
||||
------------------------------------------
|
||||
--------- TEST AND DEBUG FUNCTIONS -------
|
||||
|
||||
@@ -32,7 +32,7 @@ end
|
||||
function TocResetClothingItemBodyLocation(player, side, limb)
|
||||
|
||||
local playerInv = player:getInventory()
|
||||
local limbsData = player:getModData().JCIO.limbs
|
||||
local limbsData = player:getModData().TOC.limbs
|
||||
|
||||
local amputationItemName = TocGetAmputationFullTypeFromInventory(player, side, limb)
|
||||
local equippedProsthesisItemName = TocGetEquippedProsthesisFullTypeFromInventory(player, side, limb)
|
||||
@@ -44,7 +44,7 @@ function TocResetClothingItemBodyLocation(player, side, limb)
|
||||
player:removeWornItem(amputationItem)
|
||||
player:getInventory():Remove(amputationItem)
|
||||
amputationItem = playerInv:AddItem(amputationItemName)
|
||||
JCIO_Visuals.SetTextureForAmputation(amputationItem, player, limbsData[side .. "_" .. limb].is_cicatrized)
|
||||
TOC_Visuals.SetTextureForAmputation(amputationItem, player, limbsData[side .. "_" .. limb].is_cicatrized)
|
||||
player:setWornItem(amputationItem:getBodyLocation(), amputationItem)
|
||||
end
|
||||
amputationItem = nil -- reset it
|
||||
@@ -78,10 +78,10 @@ function TocTestBodyLocations()
|
||||
end
|
||||
end
|
||||
|
||||
function JCIOTestItem()
|
||||
function TOCTestItem()
|
||||
local player = getPlayer()
|
||||
local player_inventory = player:getInventory()
|
||||
local item_name = "JCIO.Amputation_" .. "Right" .. "_" .. "Hand"
|
||||
local item_name = "TOC.Amputation_" .. "Right" .. "_" .. "Hand"
|
||||
local found_item = player_inventory:FindAndReturn(item_name)
|
||||
|
||||
print(found_item:getID())
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
------------------------------------------
|
||||
------------- JUST CUT IT OUT ------------
|
||||
-------------- THE ONLY CURE -------------
|
||||
------------------------------------------
|
||||
------------- UPDATE EVENTS --------------
|
||||
|
||||
|
||||
require "JCIO_Init"
|
||||
require "TOC_Init"
|
||||
|
||||
local function CheckIfPlayerIsInfected(player, limbsData)
|
||||
|
||||
local bodyDamage = player:getBodyDamage()
|
||||
|
||||
-- Check for amputable limbs
|
||||
for _, v in ipairs(JCIO_Common.GetAcceptableBodyPartTypes()) do
|
||||
local partName = JCIO_Common.GetPartNameFromBodyPartType(v)
|
||||
for _, v in ipairs(TOC_Common.GetAcceptableBodyPartTypes()) do
|
||||
local partName = TOC_Common.GetPartNameFromBodyPartType(v)
|
||||
local partData = limbsData[partName]
|
||||
local bodyPart = bodyDamage:getBodyPart(v)
|
||||
|
||||
@@ -27,25 +27,25 @@ local function CheckIfPlayerIsInfected(player, limbsData)
|
||||
end
|
||||
|
||||
-- Check for everything else
|
||||
for _, v in pairs(JCIO_Common.GetOtherBodyPartTypes()) do
|
||||
for _, v in pairs(TOC_Common.GetOtherBodyPartTypes()) do
|
||||
if bodyDamage:getBodyPart(v):bitten() then
|
||||
limbsData.isOtherBodypartInfected = true -- Even one is enough, stop cycling if we find it
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
local function ManagePhantomPain(player, jcioModData)
|
||||
local function ManagePhantomPain(player, TOCModData)
|
||||
|
||||
local limbsData = jcioModData.limbs
|
||||
local limbParameters = JCIO.limbParameters
|
||||
local limbsData = TOCModData.limbs
|
||||
local limbParameters = TOC.limbParameters
|
||||
|
||||
|
||||
local body_damage = player:getBodyDamage()
|
||||
|
||||
for _, partName in pairs(JCIO_Common.GetPartNames()) do
|
||||
for _, partName in pairs(TOC_Common.GetPartNames()) do
|
||||
|
||||
if limbsData[partName].isCut and limbsData[partName].isAmputationShown and ZombRand(1, 100) < 10 then
|
||||
local body_part = body_damage:getBodyPart(JCIO_Common.GetBodyPartFromPartName(partName))
|
||||
local body_part = body_damage:getBodyPart(TOC_Common.GetBodyPartFromPartName(partName))
|
||||
local added_pain
|
||||
if limbsData[partName].isCauterized then added_pain = 60 else added_pain = 30 end
|
||||
body_part:setAdditionalPain(ZombRand(1, added_pain))
|
||||
@@ -67,9 +67,9 @@ local function SetHealthStatusForBodyPart(partData, partName, player)
|
||||
|
||||
|
||||
local bodyDamage = player:getBodyDamage()
|
||||
local bodyPart = bodyDamage:getBodyPart(JCIO_Common.GetBodyPartFromPartName(partName))
|
||||
local bodyPart = bodyDamage:getBodyPart(TOC_Common.GetBodyPartFromPartName(partName))
|
||||
if not bodyPart then
|
||||
print("JCIO ERROR: Can't update health of " .. partName)
|
||||
print("TOC ERROR: Can't update health of " .. partName)
|
||||
return false
|
||||
end
|
||||
|
||||
@@ -93,7 +93,7 @@ local function SetHealthStatusForBodyPart(partData, partName, player)
|
||||
|
||||
|
||||
if partData[partName].isCut then
|
||||
--print("JCIO: Check update for " .. part_name)
|
||||
--print("TOC: Check update for " .. part_name)
|
||||
-- if the player gets attacked and damaged in a cut area we have to reset it here since it doesn't make any sense
|
||||
-- this is using map 1:1, so it doesn't affect the wound caused by the amputation
|
||||
|
||||
@@ -128,11 +128,11 @@ local function SetHealthStatusForBodyPart(partData, partName, player)
|
||||
if partData[partName].cicatrizationTime < 0 then
|
||||
partData[partName].isCicatrized = true
|
||||
local playerInv = player:getInventory()
|
||||
local amputatedClothingItemName = JCIO_Common.FindAmputationOrProsthesisName(partName, player, "Amputation")
|
||||
local amputatedClothingItemName = TOC_Common.FindAmputationOrProsthesisName(partName, player, "Amputation")
|
||||
local amputatedClothingItem = playerInv:FindAndReturn(amputatedClothingItemName)
|
||||
|
||||
player:removeWornItem(amputatedClothingItem)
|
||||
JCIO_Visuals.SetTextureForAmputation(amputatedClothingItem, player, true)
|
||||
TOC_Visuals.SetTextureForAmputation(amputatedClothingItem, player, true)
|
||||
player:setWornItem(amputatedClothingItem:getBodyLocation(), amputatedClothingItem)
|
||||
|
||||
if (not player:HasTrait("Brave")) and ZombRand(1, 11) > 5 then
|
||||
@@ -152,7 +152,7 @@ local function UpdatePlayerHealth(player, partData)
|
||||
|
||||
if player:HasTrait("Insensitive") then bodyDamage:setPainReduction(49) end
|
||||
|
||||
for _, partName in pairs(JCIO_Common.GetPartNames()) do
|
||||
for _, partName in pairs(TOC_Common.GetPartNames()) do
|
||||
if partData[partName].isCut then
|
||||
SetHealthStatusForBodyPart(partData, partName, player)
|
||||
|
||||
@@ -163,23 +163,23 @@ end
|
||||
-------------------------------------------
|
||||
|
||||
-- MAIN UPDATE FUNCTIONS
|
||||
JCIO.UpdateOnTick = function()
|
||||
TOC.UpdateOnTick = function()
|
||||
|
||||
local player = getPlayer()
|
||||
if player == nil then
|
||||
return
|
||||
end
|
||||
|
||||
local jcioModData = player:getModData().JCIO
|
||||
local TOCModData = player:getModData().TOC
|
||||
|
||||
if jcioModData ~= nil then
|
||||
CheckIfPlayerIsInfected(player, jcioModData.limbs)
|
||||
UpdatePlayerHealth(player, jcioModData.limbs)
|
||||
if TOCModData ~= nil then
|
||||
CheckIfPlayerIsInfected(player, TOCModData.limbs)
|
||||
UpdatePlayerHealth(player, TOCModData.limbs)
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
JCIO.UpdateEveryTenMinutes = function()
|
||||
TOC.UpdateEveryTenMinutes = function()
|
||||
|
||||
local player = getPlayer()
|
||||
|
||||
@@ -187,10 +187,10 @@ JCIO.UpdateEveryTenMinutes = function()
|
||||
return
|
||||
end
|
||||
|
||||
local partData = player:getModData().JCIO.limbs
|
||||
local partData = player:getModData().TOC.limbs
|
||||
|
||||
--Experience for prosthesis user
|
||||
for _, side in pairs(JCIO.sideNames) do
|
||||
for _, side in pairs(TOC.sideNames) do
|
||||
if partData[side .. "_Hand"].isProsthesisEquipped or partData[side .. "_LowerArm"].isProsthesisEquipped then
|
||||
player:getXp():AddXP(Perks[side .. "_Hand"], 4)
|
||||
end
|
||||
@@ -198,20 +198,20 @@ JCIO.UpdateEveryTenMinutes = function()
|
||||
end
|
||||
|
||||
-- Updates the cicatrization time
|
||||
for _, partName in pairs(JCIO_Common.GetPartNames()) do
|
||||
for _, partName in pairs(TOC_Common.GetPartNames()) do
|
||||
if partData[partName].isCut and not partData[partName].isCicatrized then
|
||||
|
||||
--Wound cleanliness contributes to cicatrization
|
||||
-- TODO we reset this stuff every time we restart the game for compat reason, this is an issue
|
||||
local amputatedLimbItem = JCIO_Common.GetAmputationItemInInventory(player, partName)
|
||||
local amputatedLimbItem = TOC_Common.GetAmputationItemInInventory(player, partName)
|
||||
local itemDirtyness = amputatedLimbItem:getDirtyness()/100
|
||||
local itemBloodyness = amputatedLimbItem:getBloodLevel()/100
|
||||
|
||||
local modifier = SandboxVars.JCIO.CicatrizationSpeedMultiplier - itemBloodyness - itemDirtyness
|
||||
local modifier = SandboxVars.TOC.CicatrizationSpeedMultiplier - itemBloodyness - itemDirtyness
|
||||
|
||||
--print("JCIO: Type " .. amputated_limb_item:getFullType())
|
||||
--print("JCIO: Dirtyness " .. item_dirtyness)
|
||||
--print("JCIO: Bloodyness " .. item_bloodyness)
|
||||
--print("TOC: Type " .. amputated_limb_item:getFullType())
|
||||
--print("TOC: Dirtyness " .. item_dirtyness)
|
||||
--print("TOC: Bloodyness " .. item_bloodyness)
|
||||
|
||||
|
||||
partData[partName].cicatrizationTime = partData[partName].cicatrizationTime - modifier
|
||||
@@ -221,7 +221,7 @@ JCIO.UpdateEveryTenMinutes = function()
|
||||
end
|
||||
|
||||
end
|
||||
JCIO.UpdateEveryOneMinute = function()
|
||||
TOC.UpdateEveryOneMinute = function()
|
||||
|
||||
local player = getPlayer()
|
||||
-- To prevent errors during loading
|
||||
@@ -229,20 +229,20 @@ JCIO.UpdateEveryOneMinute = function()
|
||||
return
|
||||
end
|
||||
|
||||
local jcioModData = player:getModData().JCIO
|
||||
local TOCModData = player:getModData().TOC
|
||||
|
||||
if jcioModData ~= nil then
|
||||
ManagePhantomPain(player, jcioModData)
|
||||
if TOCModData ~= nil then
|
||||
ManagePhantomPain(player, TOCModData)
|
||||
end
|
||||
|
||||
|
||||
|
||||
-- Updates JCIO data in a global way, basically player:transmitModData but it works
|
||||
-- Updates TOC data in a global way, basically player:transmitModData but it works
|
||||
-- Sends only Limbs since the other stuff is mostly static
|
||||
if jcioModData ~= nil then
|
||||
if TOCModData ~= nil then
|
||||
-- FIXME Send little packets instead of the whole thing?
|
||||
-- TODO we shouldn't run this if we're in SP I guess?
|
||||
sendClientCommand(player, 'JCIO', 'ChangePlayerState', { jcioModData.limbs } )
|
||||
sendClientCommand(player, 'TOC', 'ChangePlayerState', { TOCModData.limbs } )
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
------------------------------------------
|
||||
------------- JUST CUT IT OUT ------------
|
||||
-------------- THE ONLY CURE -------------
|
||||
------------------------------------------
|
||||
------------ VISUALS FUNCTIONS -----------
|
||||
|
||||
|
||||
if JCIO_Visuals == nil then
|
||||
JCIO_Visuals = {}
|
||||
if TOC_Visuals == nil then
|
||||
TOC_Visuals = {}
|
||||
end
|
||||
|
||||
|
||||
JCIO_Visuals.SetTextureForAmputation = function(item, player, cicatrized)
|
||||
TOC_Visuals.SetTextureForAmputation = function(item, player, cicatrized)
|
||||
local humanVisual = player:getHumanVisual()
|
||||
local textureString = humanVisual:getSkinTexture()
|
||||
|
||||
@@ -35,12 +35,12 @@ JCIO_Visuals.SetTextureForAmputation = function(item, player, cicatrized)
|
||||
end
|
||||
end
|
||||
|
||||
--print("JCIO: Setting texture " .. matched_index)
|
||||
--print("TOC: Setting texture " .. matched_index)
|
||||
item:getVisual():setTextureChoice(tonumber(matchedIndex - 1)) -- it counts from 0, so we have to subtract 1
|
||||
|
||||
end
|
||||
|
||||
JCIO_Visuals.SetBloodOnAmputation = function(player, bodyPart)
|
||||
TOC_Visuals.SetBloodOnAmputation = function(player, bodyPart)
|
||||
|
||||
local bodyPartType = bodyPart:getType()
|
||||
local bloodBodyPartType
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
------------------------------------------
|
||||
------------- JUST CUT IT OUT ------------
|
||||
-------------- THE ONLY CURE -------------
|
||||
------------------------------------------
|
||||
|
||||
require "TimedActions/ISBaseTimedAction"
|
||||
|
||||
JCIO_CutLimbAction = ISBaseTimedAction:derive("JCIO_CutLimbAction")
|
||||
TOC_CutLimbAction = ISBaseTimedAction:derive("TOC_CutLimbAction")
|
||||
|
||||
|
||||
function JCIO_CutLimbAction:isValid()
|
||||
function TOC_CutLimbAction:isValid()
|
||||
return self.patientX == self.patient:getX() and self.patientY == self.patient:getY()
|
||||
end
|
||||
|
||||
function JCIO_CutLimbAction:waitToStart()
|
||||
function TOC_CutLimbAction:waitToStart()
|
||||
if self.patient == self.surgeon then
|
||||
return false
|
||||
end
|
||||
@@ -19,7 +19,7 @@ function JCIO_CutLimbAction:waitToStart()
|
||||
return self.surgeon:shouldBeTurning()
|
||||
end
|
||||
|
||||
function JCIO_CutLimbAction:update()
|
||||
function TOC_CutLimbAction:update()
|
||||
if self.patient ~= self.surgeon then
|
||||
self.surgeon:faceThisObject(self.patient)
|
||||
end
|
||||
@@ -29,7 +29,7 @@ function JCIO_CutLimbAction:update()
|
||||
self.soundTime = getTimestamp()
|
||||
|
||||
if not self.character:getEmitter():isPlaying(self.sawSound) then
|
||||
--print("JCIO: Running sound again")
|
||||
--print("TOC: Running sound again")
|
||||
self.sawSound = self.character:getEmitter():playSound("Amputation_Sound")
|
||||
addSound(self.surgeon, self.surgeon:getX(), self.surgeon:getY(), self.surgeon:getZ(), 3, 3)
|
||||
end
|
||||
@@ -38,7 +38,7 @@ function JCIO_CutLimbAction:update()
|
||||
|
||||
end
|
||||
|
||||
function JCIO_CutLimbAction:stop()
|
||||
function TOC_CutLimbAction:stop()
|
||||
|
||||
--print("Stopping ISCutLimb")
|
||||
|
||||
@@ -57,11 +57,11 @@ end
|
||||
|
||||
|
||||
|
||||
function JCIO_CutLimbAction:start()
|
||||
function TOC_CutLimbAction:start()
|
||||
-- TODO Add a check so you can't cut your arm if you don't have hands or if you only have one arm and want to cut that same arm.
|
||||
|
||||
self:setActionAnim("SawLog")
|
||||
local sawItem = JCIO_Common.GetSawInInventory(self.surgeon)
|
||||
local sawItem = TOC_Common.GetSawInInventory(self.surgeon)
|
||||
|
||||
self.soundTime = 0
|
||||
self.worldSoundTime = 0
|
||||
@@ -81,9 +81,9 @@ function JCIO_CutLimbAction:start()
|
||||
end
|
||||
|
||||
if self.patient == self.surgeon then
|
||||
JCIO.DamagePlayerDuringAmputation(self.patient, self.partName)
|
||||
TOC.DamagePlayerDuringAmputation(self.patient, self.partName)
|
||||
else
|
||||
sendClientCommand(self.surgeon, "JCIO", "AskDamageOtherPlayer", {self.patient:getOnlineID(), self.partName})
|
||||
sendClientCommand(self.surgeon, "TOC", "AskDamageOtherPlayer", {self.patient:getOnlineID(), self.partName})
|
||||
end
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ function JCIO_CutLimbAction:start()
|
||||
|
||||
end
|
||||
|
||||
function JCIO_CutLimbAction:findArgs()
|
||||
function TOC_CutLimbAction:findArgs()
|
||||
local surgeonFactor = self.surgeon:getPerkLevel(Perks.Doctor)
|
||||
if self.surgeon:getDescriptor():getProfession() == "surgeon" then surgeonFactor = surgeonFactor + 15 end
|
||||
if self.surgeon:getDescriptor():getProfession() == "doctor" then surgeonFactor = surgeonFactor + 9 end
|
||||
@@ -139,14 +139,14 @@ function JCIO_CutLimbAction:findArgs()
|
||||
return surgeonFactor, bandageTable, painkiller_table
|
||||
end
|
||||
|
||||
function JCIO_CutLimbAction:perform()
|
||||
function TOC_CutLimbAction:perform()
|
||||
local surgeonFactor, bandageTable, painkillerTable = self:findArgs()
|
||||
|
||||
if self.patient ~= self.surgeon and isClient() then
|
||||
SendCutLimb(self.patient, self.partName, surgeonFactor, bandageTable, painkillerTable)
|
||||
sendClientCommand(self.surgeon, "JCIO", "AskStopAmputationSound", {surgeonID = self.surgeon:getOnlineID()})
|
||||
sendClientCommand(self.surgeon, "TOC", "AskStopAmputationSound", {surgeonID = self.surgeon:getOnlineID()})
|
||||
else
|
||||
JCIO.CutLimb(self.partName, surgeonFactor, bandageTable, painkillerTable)
|
||||
TOC.CutLimb(self.partName, surgeonFactor, bandageTable, painkillerTable)
|
||||
end
|
||||
|
||||
self.surgeon:getEmitter():stopSoundByName("Amputation_Sound")
|
||||
@@ -155,7 +155,7 @@ function JCIO_CutLimbAction:perform()
|
||||
|
||||
end
|
||||
|
||||
function JCIO_CutLimbAction:new(patient, surgeon, partName)
|
||||
function TOC_CutLimbAction:new(patient, surgeon, partName)
|
||||
|
||||
-- TODO align surgeon, patient not patient, surgeon
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
require "TimedActions/ISBaseTimedAction"
|
||||
|
||||
JCIO_InstallProsthesisAction = ISBaseTimedAction:derive("JCIO_InstallProsthesisAction")
|
||||
TOC_InstallProsthesisAction = ISBaseTimedAction:derive("TOC_InstallProsthesisAction")
|
||||
|
||||
function JCIO_InstallProsthesisAction:isValid()
|
||||
function TOC_InstallProsthesisAction:isValid()
|
||||
|
||||
-- TODO add here conditions if the action can be performed or not, so if thing is in inventory
|
||||
-- TODO 'not sure about multiplayer, maybe an overriding check?
|
||||
return true
|
||||
end
|
||||
|
||||
function JCIO_InstallProsthesisAction:update()
|
||||
function TOC_InstallProsthesisAction:update()
|
||||
self.item:setJobDelta(self:getJobDelta())
|
||||
end
|
||||
|
||||
function JCIO_InstallProsthesisAction:start()
|
||||
function TOC_InstallProsthesisAction:start()
|
||||
self.item:setJobType("Install prosthesis")
|
||||
self.item:setJobDelta(0.0)
|
||||
|
||||
@@ -22,12 +22,12 @@ function JCIO_InstallProsthesisAction:start()
|
||||
|
||||
end
|
||||
|
||||
function JCIO_InstallProsthesisAction:stop()
|
||||
function TOC_InstallProsthesisAction:stop()
|
||||
ISBaseTimedAction.stop(self)
|
||||
self.item:setJobDelta(0.0)
|
||||
end
|
||||
|
||||
function JCIO_InstallProsthesisAction:perform()
|
||||
function TOC_InstallProsthesisAction:perform()
|
||||
|
||||
local prosthesisBaseName = self.item:getType()
|
||||
|
||||
@@ -35,7 +35,7 @@ function JCIO_InstallProsthesisAction:perform()
|
||||
-- local toc_data = self.character:getModData().TOC
|
||||
--local partName = TocGetPartNameFromBodyPartType(self.bodyPart:getType())
|
||||
|
||||
local bodyPartType = JCIO_Common.GetBodyPartFromPartName(self.partName)
|
||||
local bodyPartType = TOC_Common.GetBodyPartFromPartName(self.partName)
|
||||
|
||||
-- Check if can be performed. This shouldn't be necessary, but just to be sure
|
||||
if bodyPartType == BodyPartType.UpperArm_L or bodyPartType == BodyPartType.UpperArm_R then
|
||||
@@ -49,7 +49,7 @@ function JCIO_InstallProsthesisAction:perform()
|
||||
|
||||
SendEquipProsthesis(self.patient, self.partName, self.item, prosthesisBaseName)
|
||||
else
|
||||
JCIO.EquipProsthesis(self.partName, self.item, prosthesisBaseName)
|
||||
TOC.EquipProsthesis(self.partName, self.item, prosthesisBaseName)
|
||||
|
||||
end
|
||||
|
||||
@@ -60,7 +60,7 @@ function JCIO_InstallProsthesisAction:perform()
|
||||
ISBaseTimedAction.perform(self)
|
||||
end
|
||||
|
||||
function JCIO_InstallProsthesisAction:new(surgeon, patient, item, partName)
|
||||
function TOC_InstallProsthesisAction:new(surgeon, patient, item, partName)
|
||||
|
||||
local o = ISBaseTimedAction.new(self, patient)
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
require "TimedActions/ISBaseTimedAction"
|
||||
|
||||
JCIO_OperateLimbAction = ISBaseTimedAction:derive("JCIO_OperateLimbAction")
|
||||
TOC_OperateLimbAction = ISBaseTimedAction:derive("TOC_OperateLimbAction")
|
||||
|
||||
function JCIO_OperateLimbAction:isValid()
|
||||
function TOC_OperateLimbAction:isValid()
|
||||
return self.patientX == self.patient:getX() and self.patientY == self.patient:getY()
|
||||
end
|
||||
|
||||
function JCIO_OperateLimbAction:waitToStart()
|
||||
function TOC_OperateLimbAction:waitToStart()
|
||||
if self.patient == self.surgeon then
|
||||
return false
|
||||
end
|
||||
@@ -14,13 +14,13 @@ function JCIO_OperateLimbAction:waitToStart()
|
||||
return self.surgeon:shouldBeTurning()
|
||||
end
|
||||
|
||||
function JCIO_OperateLimbAction:update()
|
||||
function TOC_OperateLimbAction:update()
|
||||
if self.patient ~= self.surgeon then
|
||||
self.surgeon:faceThisObject(self.patient)
|
||||
end
|
||||
end
|
||||
|
||||
function JCIO_OperateLimbAction:start()
|
||||
function TOC_OperateLimbAction:start()
|
||||
self:setActionAnim("MedicalCheck")
|
||||
if self.useOven then
|
||||
self.sound = self.patient:getEmitter():playSound("Burn_sound")
|
||||
@@ -28,7 +28,7 @@ function JCIO_OperateLimbAction:start()
|
||||
end
|
||||
end
|
||||
|
||||
function JCIO_OperateLimbAction:findArgs()
|
||||
function TOC_OperateLimbAction:findArgs()
|
||||
local surgeonFactor = self.surgeon:getPerkLevel(Perks.Doctor)
|
||||
|
||||
if self.useOven then
|
||||
@@ -53,13 +53,13 @@ function JCIO_OperateLimbAction:findArgs()
|
||||
return surgeonFactor, self.useOven;
|
||||
end
|
||||
|
||||
function JCIO_OperateLimbAction:perform()
|
||||
function TOC_OperateLimbAction:perform()
|
||||
local surgeonFactor, useOven = self:findArgs()
|
||||
|
||||
if self.patient ~= self.surgeon and isClient() then
|
||||
SendOperateLimb(self.patient, self.partName, surgeonFactor, useOven)
|
||||
else
|
||||
JCIO.OperateLimb(self.partName, surgeonFactor, useOven)
|
||||
TOC.OperateLimb(self.partName, surgeonFactor, useOven)
|
||||
end
|
||||
self.surgeon:getXp():AddXP(Perks.Doctor, 400)
|
||||
|
||||
@@ -70,7 +70,7 @@ function JCIO_OperateLimbAction:perform()
|
||||
ISBaseTimedAction.perform(self)
|
||||
end
|
||||
|
||||
function JCIO_OperateLimbAction:new(patient, surgeon, kit, partName, useOven)
|
||||
function TOC_OperateLimbAction:new(patient, surgeon, kit, partName, useOven)
|
||||
local o = ISBaseTimedAction.new(self, patient)
|
||||
o.partName = partName
|
||||
o.patient = patient
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
require "TimedActions/ISBaseTimedAction"
|
||||
|
||||
JCIO_UninstallProsthesisAction = ISBaseTimedAction:derive("JCIO_UninstallProsthesisAction")
|
||||
TOC_UninstallProsthesisAction = ISBaseTimedAction:derive("TOC_UninstallProsthesisAction")
|
||||
|
||||
function JCIO_UninstallProsthesisAction:isValid()
|
||||
function TOC_UninstallProsthesisAction:isValid()
|
||||
|
||||
if self.item ~= nil and self.isProsthesisEquipped then
|
||||
return true
|
||||
@@ -11,11 +11,11 @@ function JCIO_UninstallProsthesisAction:isValid()
|
||||
end
|
||||
end
|
||||
|
||||
function JCIO_UninstallProsthesisAction:update()
|
||||
function TOC_UninstallProsthesisAction:update()
|
||||
self.item:setJobDelta(self:getJobDelta())
|
||||
end
|
||||
|
||||
function JCIO_UninstallProsthesisAction:start()
|
||||
function TOC_UninstallProsthesisAction:start()
|
||||
self.item:setJobType("Uninstall prothesis")
|
||||
self.item:setJobDelta(0.0);
|
||||
self:setActionAnim("WearClothing");
|
||||
@@ -29,12 +29,12 @@ function JCIO_UninstallProsthesisAction:start()
|
||||
self.character:setSecondaryHandItem(self.item)
|
||||
end
|
||||
|
||||
function JCIO_UninstallProsthesisAction:stop()
|
||||
function TOC_UninstallProsthesisAction:stop()
|
||||
ISBaseTimedAction.stop(self);
|
||||
self.item:setJobDelta(0.0);
|
||||
end
|
||||
|
||||
function JCIO_UninstallProsthesisAction:perform()
|
||||
function TOC_UninstallProsthesisAction:perform()
|
||||
|
||||
self.item:getContainer():setDrawDirty(true)
|
||||
self.item:setJobDelta(0.0)
|
||||
@@ -54,18 +54,18 @@ function JCIO_UninstallProsthesisAction:perform()
|
||||
|
||||
SendUnequipProsthesis(self.patient, self.partName, self.item)
|
||||
else
|
||||
JCIO.OperateLimb(self.patient, self.partName, self.item)
|
||||
TOC.OperateLimb(self.patient, self.partName, self.item)
|
||||
end
|
||||
|
||||
ISBaseTimedAction.perform(self)
|
||||
end
|
||||
|
||||
function JCIO_UninstallProsthesisAction:new(surgeon, patient, partName)
|
||||
function TOC_UninstallProsthesisAction:new(surgeon, patient, partName)
|
||||
local o = ISBaseTimedAction.new(self, surgeon)
|
||||
|
||||
local limbsData = patient:getModData().JCIO.limbs
|
||||
local limbsData = patient:getModData().TOC.limbs
|
||||
|
||||
o.item = JCIO_Common.FindItemInProstBodyLocation(partName, patient)
|
||||
o.item = TOC_Common.FindItemInProstBodyLocation(partName, patient)
|
||||
o.character = surgeon -- For animation purposes
|
||||
|
||||
o.patient = patient
|
||||
|
||||
@@ -1,67 +1,67 @@
|
||||
require 'Items/ProceduralDistributions'
|
||||
|
||||
table.insert(ProceduralDistributions.list.MedicalClinicTools.items, "JCIO.SurgeonMag1")
|
||||
table.insert(ProceduralDistributions.list.MedicalClinicTools.items, "TOC.SurgeonMag1")
|
||||
table.insert(ProceduralDistributions.list.MedicalClinicTools.items, 10)
|
||||
table.insert(ProceduralDistributions.list.MedicalStorageTools.items, "JCIO.SurgeonMag1")
|
||||
table.insert(ProceduralDistributions.list.MedicalStorageTools.items, "TOC.SurgeonMag1")
|
||||
table.insert(ProceduralDistributions.list.MedicalStorageTools.items, 10)
|
||||
table.insert(ProceduralDistributions.list.ArmyStorageMedical.items, "JCIO.SurgeonMag1")
|
||||
table.insert(ProceduralDistributions.list.ArmyStorageMedical.items, "TOC.SurgeonMag1")
|
||||
table.insert(ProceduralDistributions.list.ArmyStorageMedical.items, 10)
|
||||
table.insert(ProceduralDistributions.list.SafehouseMedical.items, "JCIO.SurgeonMag1")
|
||||
table.insert(ProceduralDistributions.list.SafehouseMedical.items, "TOC.SurgeonMag1")
|
||||
table.insert(ProceduralDistributions.list.SafehouseMedical.items, 10)
|
||||
|
||||
table.insert(ProceduralDistributions.list.MedicalClinicTools.items, "JCIO.SurgeonMag2")
|
||||
table.insert(ProceduralDistributions.list.MedicalClinicTools.items, "TOC.SurgeonMag2")
|
||||
table.insert(ProceduralDistributions.list.MedicalClinicTools.items, 10)
|
||||
table.insert(ProceduralDistributions.list.MedicalStorageTools.items, "JCIO.SurgeonMag2")
|
||||
table.insert(ProceduralDistributions.list.MedicalStorageTools.items, "TOC.SurgeonMag2")
|
||||
table.insert(ProceduralDistributions.list.MedicalStorageTools.items, 10)
|
||||
table.insert(ProceduralDistributions.list.ArmyStorageMedical.items, "JCIO.SurgeonMag2")
|
||||
table.insert(ProceduralDistributions.list.ArmyStorageMedical.items, "TOC.SurgeonMag2")
|
||||
table.insert(ProceduralDistributions.list.ArmyStorageMedical.items, 10)
|
||||
table.insert(ProceduralDistributions.list.SafehouseMedical.items, "JCIO.SurgeonMag2")
|
||||
table.insert(ProceduralDistributions.list.SafehouseMedical.items, "TOC.SurgeonMag2")
|
||||
table.insert(ProceduralDistributions.list.SafehouseMedical.items, 10)
|
||||
|
||||
table.insert(ProceduralDistributions.list.MedicalClinicTools.items, "JCIO.SurgeonMag3")
|
||||
table.insert(ProceduralDistributions.list.MedicalClinicTools.items, "TOC.SurgeonMag3")
|
||||
table.insert(ProceduralDistributions.list.MedicalClinicTools.items, 10)
|
||||
table.insert(ProceduralDistributions.list.MedicalStorageTools.items, "JCIO.SurgeonMag3")
|
||||
table.insert(ProceduralDistributions.list.MedicalStorageTools.items, "TOC.SurgeonMag3")
|
||||
table.insert(ProceduralDistributions.list.MedicalStorageTools.items, 10)
|
||||
table.insert(ProceduralDistributions.list.ArmyStorageMedical.items, "JCIO.SurgeonMag3")
|
||||
table.insert(ProceduralDistributions.list.ArmyStorageMedical.items, "TOC.SurgeonMag3")
|
||||
table.insert(ProceduralDistributions.list.ArmyStorageMedical.items, 10)
|
||||
table.insert(ProceduralDistributions.list.SafehouseMedical.items, "JCIO.SurgeonMag3")
|
||||
table.insert(ProceduralDistributions.list.SafehouseMedical.items, "TOC.SurgeonMag3")
|
||||
table.insert(ProceduralDistributions.list.SafehouseMedical.items, 10)
|
||||
|
||||
table.insert(ProceduralDistributions.list.MedicalClinicTools.items, "JCIO.ProthesisMag1")
|
||||
table.insert(ProceduralDistributions.list.MedicalClinicTools.items, "TOC.ProthesisMag1")
|
||||
table.insert(ProceduralDistributions.list.MedicalClinicTools.items, 5)
|
||||
table.insert(ProceduralDistributions.list.MedicalStorageTools.items, "JCIO.ProthesisMag1")
|
||||
table.insert(ProceduralDistributions.list.MedicalStorageTools.items, "TOC.ProthesisMag1")
|
||||
table.insert(ProceduralDistributions.list.MedicalStorageTools.items, 5)
|
||||
table.insert(ProceduralDistributions.list.ArmyStorageMedical.items, "JCIO.ProthesisMag1")
|
||||
table.insert(ProceduralDistributions.list.ArmyStorageMedical.items, "TOC.ProthesisMag1")
|
||||
table.insert(ProceduralDistributions.list.ArmyStorageMedical.items, 5)
|
||||
table.insert(ProceduralDistributions.list.SafehouseMedical.items, "JCIO.ProthesisMag1")
|
||||
table.insert(ProceduralDistributions.list.SafehouseMedical.items, "TOC.ProthesisMag1")
|
||||
table.insert(ProceduralDistributions.list.SafehouseMedical.items, 5)
|
||||
table.insert(ProceduralDistributions.list.StoreShelfMechanics.items, "JCIO.ProthesisMag1")
|
||||
table.insert(ProceduralDistributions.list.StoreShelfMechanics.items, "TOC.ProthesisMag1")
|
||||
table.insert(ProceduralDistributions.list.StoreShelfMechanics.items, 5)
|
||||
table.insert(ProceduralDistributions.list.MechanicShelfTools.items, "JCIO.ProthesisMag1")
|
||||
table.insert(ProceduralDistributions.list.MechanicShelfTools.items, "TOC.ProthesisMag1")
|
||||
table.insert(ProceduralDistributions.list.MechanicShelfTools.items, 5)
|
||||
|
||||
table.insert(ProceduralDistributions.list.MedicalClinicTools.items, "JCIO.ProthesisMag2")
|
||||
table.insert(ProceduralDistributions.list.MedicalClinicTools.items, "TOC.ProthesisMag2")
|
||||
table.insert(ProceduralDistributions.list.MedicalClinicTools.items, 5)
|
||||
table.insert(ProceduralDistributions.list.MedicalStorageTools.items, "JCIO.ProthesisMag2")
|
||||
table.insert(ProceduralDistributions.list.MedicalStorageTools.items, "TOC.ProthesisMag2")
|
||||
table.insert(ProceduralDistributions.list.MedicalStorageTools.items, 5)
|
||||
table.insert(ProceduralDistributions.list.ArmyStorageMedical.items, "JCIO.ProthesisMag2")
|
||||
table.insert(ProceduralDistributions.list.ArmyStorageMedical.items, "TOC.ProthesisMag2")
|
||||
table.insert(ProceduralDistributions.list.ArmyStorageMedical.items, 5)
|
||||
table.insert(ProceduralDistributions.list.SafehouseMedical.items, "JCIO.ProthesisMag2")
|
||||
table.insert(ProceduralDistributions.list.SafehouseMedical.items, "TOC.ProthesisMag2")
|
||||
table.insert(ProceduralDistributions.list.SafehouseMedical.items, 5)
|
||||
table.insert(ProceduralDistributions.list.StoreShelfMechanics.items, "JCIO.ProthesisMag2")
|
||||
table.insert(ProceduralDistributions.list.StoreShelfMechanics.items, "TOC.ProthesisMag2")
|
||||
table.insert(ProceduralDistributions.list.StoreShelfMechanics.items, 5)
|
||||
table.insert(ProceduralDistributions.list.MechanicShelfTools.items, "JCIO.ProthesisMag2")
|
||||
table.insert(ProceduralDistributions.list.MechanicShelfTools.items, "TOC.ProthesisMag2")
|
||||
table.insert(ProceduralDistributions.list.MechanicShelfTools.items, 5)
|
||||
|
||||
table.insert(ProceduralDistributions.list.MedicalClinicTools.items, "JCIO.ProthesisMag3")
|
||||
table.insert(ProceduralDistributions.list.MedicalClinicTools.items, "TOC.ProthesisMag3")
|
||||
table.insert(ProceduralDistributions.list.MedicalClinicTools.items, 5)
|
||||
table.insert(ProceduralDistributions.list.MedicalStorageTools.items, "JCIO.ProthesisMag3")
|
||||
table.insert(ProceduralDistributions.list.MedicalStorageTools.items, "TOC.ProthesisMag3")
|
||||
table.insert(ProceduralDistributions.list.MedicalStorageTools.items, 5)
|
||||
table.insert(ProceduralDistributions.list.ArmyStorageMedical.items, "JCIO.ProthesisMag3")
|
||||
table.insert(ProceduralDistributions.list.ArmyStorageMedical.items, "TOC.ProthesisMag3")
|
||||
table.insert(ProceduralDistributions.list.ArmyStorageMedical.items, 5)
|
||||
table.insert(ProceduralDistributions.list.SafehouseMedical.items, "JCIO.ProthesisMag3")
|
||||
table.insert(ProceduralDistributions.list.SafehouseMedical.items, "TOC.ProthesisMag3")
|
||||
table.insert(ProceduralDistributions.list.SafehouseMedical.items, 5)
|
||||
table.insert(ProceduralDistributions.list.StoreShelfMechanics.items, "JCIO.ProthesisMag3")
|
||||
table.insert(ProceduralDistributions.list.StoreShelfMechanics.items, "TOC.ProthesisMag3")
|
||||
table.insert(ProceduralDistributions.list.StoreShelfMechanics.items, 5)
|
||||
table.insert(ProceduralDistributions.list.MechanicShelfTools.items, "JCIO.ProthesisMag3")
|
||||
table.insert(ProceduralDistributions.list.MechanicShelfTools.items, "TOC.ProthesisMag3")
|
||||
table.insert(ProceduralDistributions.list.MechanicShelfTools.items, 5)
|
||||
@@ -1,15 +1,15 @@
|
||||
------------------------------------------
|
||||
------------- JUST CUT IT OUT ------------
|
||||
-------------- THE ONLY CURE -------------
|
||||
------------------------------------------
|
||||
------------- CLIENT COMMANDS ------------
|
||||
|
||||
local ClientCommands = {}
|
||||
|
||||
|
||||
-- Main handler of base functions for JCIO, based on the original work for TOC
|
||||
-- Main handler of base functions for TOC, based on the original work for TOC
|
||||
ClientCommands.SendServer = function(_, arg)
|
||||
local otherPlayer = getPlayerByOnlineID(arg["To"])
|
||||
sendServerCommand(otherPlayer, "JCIO", arg["command"], arg)
|
||||
sendServerCommand(otherPlayer, "TOC", arg["command"], arg)
|
||||
|
||||
end
|
||||
|
||||
@@ -21,14 +21,14 @@ ClientCommands.AskDamageOtherPlayer = function(_, arg)
|
||||
local patient_id = arg[1]
|
||||
local partName = arg[2]
|
||||
|
||||
sendServerCommand(patient, "JCIO", "AcceptDamageOtherPlayer", {patient_id, partName})
|
||||
sendServerCommand(patient, "TOC", "AcceptDamageOtherPlayer", {patient_id, partName})
|
||||
|
||||
end
|
||||
|
||||
ClientCommands.AskStopAmputationSound = function(_, args)
|
||||
|
||||
print("JCIO: We're in AskStopAmputationSound")
|
||||
sendServerCommand("JCIO", "StopAmputationSound", {surgeon_id = args.surgeonID})
|
||||
print("TOC: We're in AskStopAmputationSound")
|
||||
sendServerCommand("TOC", "StopAmputationSound", {surgeon_id = args.surgeonID})
|
||||
|
||||
|
||||
end
|
||||
@@ -36,7 +36,7 @@ end
|
||||
-- Animations
|
||||
ClientCommands.NotifyNewCrawlAnimation = function(_, args)
|
||||
|
||||
sendServerCommand("JCIO", "SetCrawlAnimation", {id = args.id, check = args.check})
|
||||
sendServerCommand("TOC", "SetCrawlAnimation", {id = args.id, check = args.check})
|
||||
|
||||
end
|
||||
|
||||
@@ -46,21 +46,21 @@ end
|
||||
-- Cheats
|
||||
ClientCommands.AskToResetEverything = function(_, arg)
|
||||
local clickedPlayer = getPlayerByOnlineID(arg[1])
|
||||
sendServerCommand(clickedPlayer, "JCIO", "ResetEverything", {})
|
||||
sendServerCommand(clickedPlayer, "TOC", "ResetEverything", {})
|
||||
end
|
||||
|
||||
|
||||
-- Global Mod Data data handler
|
||||
ClientCommands.ChangePlayerState = function(playerObj, args)
|
||||
ModData.get("JCIO_PLAYER_DATA")[playerObj:getUsername()] = args
|
||||
ModData.transmit("JCIO_PLAYER_DATA")
|
||||
ModData.get("TOC_PLAYER_DATA")[playerObj:getUsername()] = args
|
||||
ModData.transmit("TOC_PLAYER_DATA")
|
||||
end
|
||||
|
||||
|
||||
------ Global Mod Data -----------
|
||||
|
||||
local function OnInitGlobalModData()
|
||||
ModData.getOrCreate("JCIO_PLAYER_DATA")
|
||||
ModData.getOrCreate("TOC_PLAYER_DATA")
|
||||
end
|
||||
|
||||
Events.OnInitGlobalModData.Add(OnInitGlobalModData)
|
||||
@@ -69,7 +69,7 @@ Events.OnInitGlobalModData.Add(OnInitGlobalModData)
|
||||
------------------------------------------------------
|
||||
|
||||
local function OnClientCommand(module, command, playerObj, args)
|
||||
if module == 'JCIO' and ClientCommands[command] then
|
||||
if module == 'TOC' and ClientCommands[command] then
|
||||
ClientCommands[command](playerObj, args)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,24 +3,24 @@ local function AddBodyLocationBefore(new_location, move_to_location)
|
||||
local list = getClassFieldVal(group, getClassField(group, 1))
|
||||
group:getOrCreateLocation(new_location)
|
||||
local new_item = list:get(list:size()-1)
|
||||
print("JCIO: Created new body location" .. new_item:getId())
|
||||
print("TOC: Created new body location" .. new_item:getId())
|
||||
list:remove(new_item) -- We can't use the Index, it works if we pass the item though!
|
||||
local i = group:indexOf(move_to_location)
|
||||
list:add(i, new_item)
|
||||
end
|
||||
|
||||
|
||||
AddBodyLocationBefore("JCIO_ArmRight", "Shoes")
|
||||
AddBodyLocationBefore("JCIO_ArmLeft", "Shoes")
|
||||
AddBodyLocationBefore("TOC_ArmRight", "Shoes")
|
||||
AddBodyLocationBefore("TOC_ArmLeft", "Shoes")
|
||||
|
||||
|
||||
|
||||
AddBodyLocationBefore("JCIO_ArmRightProsthesis", "Shoes")
|
||||
AddBodyLocationBefore("JCIO_ArmLeftProsthesis", "Shoes")
|
||||
AddBodyLocationBefore("TOC_ArmRightProsthesis", "Shoes")
|
||||
AddBodyLocationBefore("TOC_ArmLeftProsthesis", "Shoes")
|
||||
|
||||
AddBodyLocationBefore("JCIO_LegRight", "FannyPackFront")
|
||||
AddBodyLocationBefore("JCIO_LegLeft", "FannyPackFront")
|
||||
AddBodyLocationBefore("TOC_LegRight", "FannyPackFront")
|
||||
AddBodyLocationBefore("TOC_LegLeft", "FannyPackFront")
|
||||
|
||||
|
||||
AddBodyLocationBefore("JCIO_LegRightProsthesis", "FannyPackFront")
|
||||
AddBodyLocationBefore("JCIO_LegLeftProsthesis", "FannyPackFront")
|
||||
AddBodyLocationBefore("TOC_LegRightProsthesis", "FannyPackFront")
|
||||
AddBodyLocationBefore("TOC_LegLeftProsthesis", "FannyPackFront")
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
DisplayName_EN = {
|
||||
|
||||
ItemName_JCIO.Amputation_Right_Hand = "Amputated Right Hand",
|
||||
ItemName_JCIO.Amputation_Right_LowerArm = "Amputated Right Forearm",
|
||||
ItemName_JCIO.Amputation_Right_UpperArm = "Amputated Entire Right Arm",
|
||||
ItemName_JCIO.Amputation_Left_Hand = "Amputated Left Hand",
|
||||
ItemName_JCIO.Amputation_Left_LowerArm = "Amputated Left Forearm",
|
||||
ItemName_JCIO.Amputation_Left_UpperArm = "Amputated Entire Left Arm",
|
||||
ItemName_TOC.Amputation_Right_Hand = "Amputated Right Hand",
|
||||
ItemName_TOC.Amputation_Right_LowerArm = "Amputated Right Forearm",
|
||||
ItemName_TOC.Amputation_Right_UpperArm = "Amputated Entire Right Arm",
|
||||
ItemName_TOC.Amputation_Left_Hand = "Amputated Left Hand",
|
||||
ItemName_TOC.Amputation_Left_LowerArm = "Amputated Left Forearm",
|
||||
ItemName_TOC.Amputation_Left_UpperArm = "Amputated Entire Left Arm",
|
||||
|
||||
ItemName_JCIO.Improvised_surgeon_kit = "Improvised surgeon kit",
|
||||
ItemName_JCIO.Surgeon_kit = "Surgeon kit",
|
||||
ItemName_JCIO.Real_surgeon_kit = "Real surgeon kit",
|
||||
ItemName_TOC.Improvised_surgeon_kit = "Improvised surgeon kit",
|
||||
ItemName_TOC.Surgeon_kit = "Surgeon kit",
|
||||
ItemName_TOC.Real_surgeon_kit = "Real surgeon kit",
|
||||
|
||||
ItemName_JCIO.Prost_Right_Hand_WoodenHook = "Right Hand - Wooden Hook",
|
||||
ItemName_JCIO.Prost_Left_Hand_WoodenHook = "Left Hand - Wooden Hook",
|
||||
ItemName_JCIO.Prost_Right_LowerArm_WoodenHook = "Right Forearm - Wooden Hook",
|
||||
ItemName_JCIO.Prost_Left_LowerArm_WoodenHook = "Left Forearm - Wooden Hook",
|
||||
ItemName_JCIO.Prost_Right_Hand_MetalHook = "Right Hand - Metal Hook",
|
||||
ItemName_JCIO.Prost_Left_Hand_MetalHook = "Left Hand - Metal Hook",
|
||||
ItemName_JCIO.Prost_Right_LowerArm_MetalHook = "Right Forearm - Metal Hook",
|
||||
ItemName_JCIO.Prost_Left_LowerArm_MetalHook = "Left Forearm - Metal Hook",
|
||||
ItemName_JCIO.Prost_Right_Hand_MetalHand = "Right Hand - Metal Hand",
|
||||
ItemName_JCIO.Prost_Left_Hand_MetalHand = "Left Hand - Metal Hand",
|
||||
ItemName_JCIO.Prost_Right_LowerArm_MetalHand = "Right Forearm - Metal Hand",
|
||||
ItemName_JCIO.Prost_Left_LowerArm_MetalHand = "Left Forearm - Metal Hand",
|
||||
ItemName_TOC.Prost_Right_Hand_WoodenHook = "Right Hand - Wooden Hook",
|
||||
ItemName_TOC.Prost_Left_Hand_WoodenHook = "Left Hand - Wooden Hook",
|
||||
ItemName_TOC.Prost_Right_LowerArm_WoodenHook = "Right Forearm - Wooden Hook",
|
||||
ItemName_TOC.Prost_Left_LowerArm_WoodenHook = "Left Forearm - Wooden Hook",
|
||||
ItemName_TOC.Prost_Right_Hand_MetalHook = "Right Hand - Metal Hook",
|
||||
ItemName_TOC.Prost_Left_Hand_MetalHook = "Left Hand - Metal Hook",
|
||||
ItemName_TOC.Prost_Right_LowerArm_MetalHook = "Right Forearm - Metal Hook",
|
||||
ItemName_TOC.Prost_Left_LowerArm_MetalHook = "Left Forearm - Metal Hook",
|
||||
ItemName_TOC.Prost_Right_Hand_MetalHand = "Right Hand - Metal Hand",
|
||||
ItemName_TOC.Prost_Left_Hand_MetalHand = "Left Hand - Metal Hand",
|
||||
ItemName_TOC.Prost_Right_LowerArm_MetalHand = "Right Forearm - Metal Hand",
|
||||
ItemName_TOC.Prost_Left_LowerArm_MetalHand = "Left Forearm - Metal Hand",
|
||||
|
||||
ItemName_JCIO.WoodenHook = "Wooden Hook",
|
||||
ItemName_JCIO.MetalHook = "Metal Hook",
|
||||
ItemName_JCIO.MetalHand = "Metal Hand",
|
||||
ItemName_JCIO.ProstheticKnife = "Prosthetic Knife",
|
||||
ItemName_TOC.WoodenHook = "Wooden Hook",
|
||||
ItemName_TOC.MetalHook = "Metal Hook",
|
||||
ItemName_TOC.MetalHand = "Metal Hand",
|
||||
ItemName_TOC.ProstheticKnife = "Prosthetic Knife",
|
||||
|
||||
ItemName_JCIO.SurgeonMag1 = "Surgeon magazine for dummies",
|
||||
ItemName_JCIO.SurgeonMag2 = "Surgeon magazine for students",
|
||||
ItemName_JCIO.SurgeonMag3 = "Surgeon magazine for experts",
|
||||
ItemName_JCIO.ProthesisMag1 = "Prothesis magazine for dummies",
|
||||
ItemName_JCIO.ProthesisMag2 = "Prothesis magazine for experienced",
|
||||
ItemName_JCIO.ProthesisMag3 = "Prothesis magazine for experts",
|
||||
ItemName_TOC.SurgeonMag1 = "Surgeon magazine for dummies",
|
||||
ItemName_TOC.SurgeonMag2 = "Surgeon magazine for students",
|
||||
ItemName_TOC.SurgeonMag3 = "Surgeon magazine for experts",
|
||||
ItemName_TOC.ProthesisMag1 = "Prothesis magazine for dummies",
|
||||
ItemName_TOC.ProthesisMag2 = "Prothesis magazine for experienced",
|
||||
ItemName_TOC.ProthesisMag3 = "Prothesis magazine for experts",
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
Sandbox_EN = {
|
||||
Sandbox_JCIO = "Just Cut It Off",
|
||||
Sandbox_TOC = "Just Cut It Off",
|
||||
|
||||
Sandbox_JCIO_RollUpSleeves = "Roll up sleeves",
|
||||
Sandbox_JCIO_RollUpSleeves_tooltip = "Currently broken, will not do anything",
|
||||
Sandbox_TOC_RollUpSleeves = "Roll up sleeves",
|
||||
Sandbox_TOC_RollUpSleeves_tooltip = "Currently broken, will not do anything",
|
||||
|
||||
Sandbox_JCIO_CicatrizationSpeedMultiplier = "Cicatrization speed multiplier",
|
||||
Sandbox_JCIO_CicatrizationSpeedMultiplier_tooltip = "Customize this to make the cicatrization process faster",
|
||||
Sandbox_TOC_CicatrizationSpeedMultiplier = "Cicatrization speed multiplier",
|
||||
Sandbox_TOC_CicatrizationSpeedMultiplier_tooltip = "Customize this to make the cicatrization process faster",
|
||||
|
||||
Sandbox_JCIO_AmputationTimeMultiplier = "Amputation Time Scaler",
|
||||
Sandbox_JCIO_AmputationTimeMultiplier_tooltip = "Scales the amount of time multplying added after amputation",
|
||||
Sandbox_TOC_AmputationTimeMultiplier = "Amputation Time Scaler",
|
||||
Sandbox_TOC_AmputationTimeMultiplier_tooltip = "Scales the amount of time multplying added after amputation",
|
||||
|
||||
|
||||
}
|
||||
@@ -1,34 +1,34 @@
|
||||
VERSION = 1,
|
||||
|
||||
|
||||
/* option JCIO.RollUpSleeves
|
||||
/* option TOC.RollUpSleeves
|
||||
{
|
||||
type = boolean,
|
||||
default = true,
|
||||
|
||||
page = JCIO,
|
||||
translation = JCIO_RollUpSleeves,
|
||||
page = TOC,
|
||||
translation = TOC_RollUpSleeves,
|
||||
|
||||
} */
|
||||
|
||||
option JCIO.CicatrizationSpeedMultiplier
|
||||
option TOC.CicatrizationSpeedMultiplier
|
||||
{
|
||||
type = integer,
|
||||
min = 1,
|
||||
max = 10,
|
||||
default = 1,
|
||||
page = JCIO,
|
||||
translation = JCIO_CicatrizationSpeedMultiplier,
|
||||
page = TOC,
|
||||
translation = TOC_CicatrizationSpeedMultiplier,
|
||||
|
||||
}
|
||||
option JCIO.AmputationTimeMultiplier
|
||||
option TOC.AmputationTimeMultiplier
|
||||
{
|
||||
type = integer,
|
||||
min = 1,
|
||||
max = 10,
|
||||
default = 1,
|
||||
page = JCIO,
|
||||
translation = JCIO_AmputationTimeMultiplier
|
||||
page = TOC,
|
||||
translation = TOC_AmputationTimeMultiplier
|
||||
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module JCIO
|
||||
module TOC
|
||||
{
|
||||
imports
|
||||
{
|
||||
@@ -11,7 +11,7 @@ imports
|
||||
DisplayName = Amputated right hand,
|
||||
|
||||
ClothingItem = Amputation_Right_Hand,
|
||||
BodyLocation = JCIO_ArmRight,
|
||||
BodyLocation = TOC_ArmRight,
|
||||
|
||||
Weight = 0,
|
||||
CombatSpeedModifier = 0.9,
|
||||
@@ -30,7 +30,7 @@ imports
|
||||
DisplayName = Amputated right forearm,
|
||||
|
||||
ClothingItem = Amputation_Right_LowerArm,
|
||||
BodyLocation = JCIO_ArmRight,
|
||||
BodyLocation = TOC_ArmRight,
|
||||
|
||||
Weight = 0,
|
||||
CombatSpeedModifier = 0.8,
|
||||
@@ -48,7 +48,7 @@ imports
|
||||
DisplayName = Amputated entire right arm,
|
||||
|
||||
ClothingItem = Amputation_Right_UpperArm,
|
||||
BodyLocation = JCIO_ArmRight,
|
||||
BodyLocation = TOC_ArmRight,
|
||||
BloodLocation = UpperArms;UpperBody,
|
||||
Weight = 0,
|
||||
CombatSpeedModifier = 0.7,
|
||||
@@ -65,7 +65,7 @@ imports
|
||||
DisplayName = Amputated left hand,
|
||||
|
||||
ClothingItem = Amputation_Left_Hand,
|
||||
BodyLocation = JCIO_ArmLeft,
|
||||
BodyLocation = TOC_ArmLeft,
|
||||
|
||||
Weight = 0,
|
||||
CombatSpeedModifier = 0.9,
|
||||
@@ -84,7 +84,7 @@ imports
|
||||
DisplayCategory = Amputation,
|
||||
DisplayName = Amputated left forearm,
|
||||
ClothingItem = Amputation_Left_LowerArm,
|
||||
BodyLocation = JCIO_ArmLeft,
|
||||
BodyLocation = TOC_ArmLeft,
|
||||
|
||||
Weight = 0,
|
||||
CombatSpeedModifier = 0.8,
|
||||
@@ -102,7 +102,7 @@ imports
|
||||
Type = Clothing,
|
||||
DisplayName = Amputated entire left arm,
|
||||
ClothingItem = Amputation_Left_UpperArm,
|
||||
BodyLocation = JCIO_ArmLeft,
|
||||
BodyLocation = TOC_ArmLeft,
|
||||
|
||||
Weight = 0,
|
||||
CombatSpeedModifier = 0.7,
|
||||
@@ -162,7 +162,7 @@ imports
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Right Hand - Wooden Hook,
|
||||
ClothingItem = Prost_Right_Hand_WoodenHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = woodenHook,
|
||||
Tooltip = Tooltip_equip_prothesis_hand,
|
||||
@@ -177,7 +177,7 @@ imports
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Left Hand - Wooden Hook,
|
||||
ClothingItem = Prost_Left_Hand_WoodenHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = woodenHook,
|
||||
Tooltip = Tooltip_equip_prothesis_hand,
|
||||
@@ -193,7 +193,7 @@ imports
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Right Hand - Metal Hook,
|
||||
ClothingItem = Prost_Right_Hand_MetalHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalHook,
|
||||
Tooltip = Tooltip_equip_prothesis_hand,
|
||||
@@ -208,7 +208,7 @@ imports
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Left Hand - Metal Hook,
|
||||
ClothingItem = Prost_Left_Hand_MetalHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalHook,
|
||||
Tooltip = Tooltip_equip_prothesis_hand,
|
||||
@@ -222,7 +222,7 @@ imports
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Right Hand - Metal Hand,
|
||||
ClothingItem = Prost_Right_Hand_MetalHand,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalHand,
|
||||
Tooltip = Tooltip_equip_prothesis_hand,
|
||||
@@ -236,7 +236,7 @@ imports
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Left Hand - Metal Hand,
|
||||
ClothingItem = Prost_Left_Hand_MetalHand,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalHand,
|
||||
Tooltip = Tooltip_equip_prothesis_hand",
|
||||
@@ -250,7 +250,7 @@ imports
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Right Forearm - Wooden Hook,
|
||||
ClothingItem = Prost_Right_LowerArm_WoodenHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = LowerArms;Hands,
|
||||
Icon = woodenHook,
|
||||
Tooltip = Tooltip_equip_prothesis_fore,
|
||||
@@ -264,7 +264,7 @@ imports
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Left Forearm - Wooden Hook,
|
||||
ClothingItem = Prost_Left_LowerArm_WoodenHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = LowerArms;Hands,
|
||||
Icon = woodenHook,
|
||||
Tooltip = Tooltip_equip_prothesis_fore,
|
||||
@@ -278,7 +278,7 @@ imports
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Right Forearm - Metal Hook,
|
||||
ClothingItem = Prost_Right_LowerArm_MetalHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = LowerArms;Hands,
|
||||
Icon = metalHook,
|
||||
Tooltip = Tooltip_equip_prothesis_fore,
|
||||
@@ -292,7 +292,7 @@ imports
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Left Forearm - Metal Hook,
|
||||
ClothingItem = Prost_Left_LowerArm_MetalHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = LowerArms;Hands,
|
||||
|
||||
Icon = metalHook,
|
||||
@@ -307,7 +307,7 @@ imports
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Right Forearm - Metal Hand,
|
||||
ClothingItem = Prost_Right_LowerArm_MetalHand,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = LowerArms;Hands,
|
||||
Icon = metalHand,
|
||||
Tooltip = Tooltip_equip_prothesis_fore,
|
||||
@@ -321,7 +321,7 @@ imports
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Left Forearm - Metal Hand,
|
||||
ClothingItem = Prost_Left_LowerArm_MetalHand,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = LowerArms;Hands,
|
||||
Icon = metalHand,
|
||||
Tooltip = Tooltip_equip_prothesis_fore,
|
||||
@@ -400,7 +400,7 @@ item Prost_WoodenBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Wooden Hook,
|
||||
ClothingItem = Prost_Left_Hand_WoodenBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -413,7 +413,7 @@ item Prost_WoodenBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Wooden Hook,
|
||||
ClothingItem = Prost_Right_Hand_WoodenBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -426,7 +426,7 @@ item Prost_WoodenBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Wooden Hook,
|
||||
ClothingItem = Prost_Left_LowerArm_WoodenBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -439,7 +439,7 @@ item Prost_WoodenBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Wooden Hook,
|
||||
ClothingItem = Prost_Right_LowerArm_WoodenBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -452,7 +452,7 @@ item Prost_WoodenBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Metal Hook,
|
||||
ClothingItem = Prost_Left_Hand_WoodenBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -465,7 +465,7 @@ item Prost_WoodenBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Metal Hook,
|
||||
ClothingItem = Prost_Right_Hand_WoodenBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -478,7 +478,7 @@ item Prost_WoodenBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Metal Hook,
|
||||
ClothingItem = Prost_Left_LowerArm_WoodenBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -491,7 +491,7 @@ item Prost_WoodenBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Metal Hook,
|
||||
ClothingItem = Prost_Right_LowerArm_WoodenBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -504,7 +504,7 @@ item Prost_WoodenBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Metal Hand,
|
||||
ClothingItem = Prost_Left_Hand_WoodenBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -517,7 +517,7 @@ item Prost_WoodenBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Metal Hand,
|
||||
ClothingItem = Prost_Right_Hand_WoodenBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -530,7 +530,7 @@ item Prost_WoodenBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Metal Hand,
|
||||
ClothingItem = Prost_Left_LowerArm_WoodenBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -543,7 +543,7 @@ item Prost_WoodenBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Wooden Base and Metal Hand,
|
||||
ClothingItem = Prost_Right_LowerArm_WoodenBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -556,7 +556,7 @@ item Prost_MetalBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Wooden Hook,
|
||||
ClothingItem = Prost_Left_Hand_MetalBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -569,7 +569,7 @@ item Prost_MetalBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Wooden Hook,
|
||||
ClothingItem = Prost_Right_Hand_MetalBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -582,7 +582,7 @@ item Prost_MetalBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Wooden Hook,
|
||||
ClothingItem = Prost_Left_LowerArm_MetalBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -595,7 +595,7 @@ item Prost_MetalBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Wooden Hook,
|
||||
ClothingItem = Prost_Right_LowerArm_MetalBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -608,7 +608,7 @@ item Prost_MetalBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Metal Hook,
|
||||
ClothingItem = Prost_Left_Hand_MetalBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -621,7 +621,7 @@ item Prost_MetalBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Metal Hook,
|
||||
ClothingItem = Prost_Right_Hand_MetalBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -634,7 +634,7 @@ item Prost_MetalBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Metal Hook,
|
||||
ClothingItem = Prost_Left_LowerArm_MetalBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -647,7 +647,7 @@ item Prost_MetalBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Metal Hook,
|
||||
ClothingItem = Prost_Right_LowerArm_MetalBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -660,7 +660,7 @@ item Prost_MetalBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Metal Hand,
|
||||
ClothingItem = Prost_Left_Hand_MetalBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -673,7 +673,7 @@ item Prost_MetalBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Metal Hand,
|
||||
ClothingItem = Prost_Right_Hand_MetalBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -686,7 +686,7 @@ item Prost_MetalBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Metal Hand,
|
||||
ClothingItem = Prost_Left_LowerArm_MetalBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -699,7 +699,7 @@ item Prost_MetalBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Metal Base and Metal Hand,
|
||||
ClothingItem = Prost_Right_LowerArm_MetalBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -712,7 +712,7 @@ item Prost_LeatherBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Wooden Hook,
|
||||
ClothingItem = Prost_Left_Hand_LeatherBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -725,7 +725,7 @@ item Prost_LeatherBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Wooden Hook,
|
||||
ClothingItem = Prost_Right_Hand_LeatherBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -738,7 +738,7 @@ item Prost_LeatherBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Wooden Hook,
|
||||
ClothingItem = Prost_Left_LowerArm_LeatherBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -751,7 +751,7 @@ item Prost_LeatherBase_WoodenHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Wooden Hook,
|
||||
ClothingItem = Prost_Right_LowerArm_LeatherBase_WoodenHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -764,7 +764,7 @@ item Prost_LeatherBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Metal Hook,
|
||||
ClothingItem = Prost_Left_Hand_LeatherBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -777,7 +777,7 @@ item Prost_LeatherBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Metal Hook,
|
||||
ClothingItem = Prost_Right_Hand_LeatherBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -790,7 +790,7 @@ item Prost_LeatherBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Metal Hook,
|
||||
ClothingItem = Prost_Left_LowerArm_LeatherBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -803,7 +803,7 @@ item Prost_LeatherBase_MetalHook
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Metal Hook,
|
||||
ClothingItem = Prost_Right_LowerArm_LeatherBase_MetalHook,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -816,7 +816,7 @@ item Prost_LeatherBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Metal Hand,
|
||||
ClothingItem = Prost_Left_Hand_LeatherBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -829,7 +829,7 @@ item Prost_LeatherBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Metal Hand,
|
||||
ClothingItem = Prost_Right_Hand_LeatherBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -842,7 +842,7 @@ item Prost_LeatherBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Metal Hand,
|
||||
ClothingItem = Prost_Left_LowerArm_LeatherBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmLeftProsthesis,
|
||||
BodyLocation = TOC_ArmLeftProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -855,7 +855,7 @@ item Prost_LeatherBase_MetalHand
|
||||
DisplayCategory = Prosthesis,
|
||||
DisplayName = Prosthesis - Leather Base and Metal Hand,
|
||||
ClothingItem = Prost_Right_LowerArm_LeatherBase_MetalHand,
|
||||
BodyLocation = JCIO_ArmRightProsthesis,
|
||||
BodyLocation = TOC_ArmRightProsthesis,
|
||||
BloodLocation = Hands,
|
||||
Icon = metalLeg,
|
||||
Tooltip = TempTooltip,
|
||||
@@ -980,7 +980,7 @@ item Amputation_Left_Foot
|
||||
DisplayName = Amputated Left Foot,
|
||||
|
||||
ClothingItem = Amputation_Left_Foot,
|
||||
BodyLocation = JCIO_LegLeft,
|
||||
BodyLocation = TOC_LegLeft,
|
||||
|
||||
Weight = 0,
|
||||
CombatSpeedModifier = 0.9,
|
||||
@@ -999,7 +999,7 @@ item Amputation_Right_Foot
|
||||
DisplayName = Amputated Right Foot,
|
||||
|
||||
ClothingItem = Amputation_Right_Foot,
|
||||
BodyLocation = JCIO_LegRight,
|
||||
BodyLocation = TOC_LegRight,
|
||||
|
||||
Weight = 0,
|
||||
CombatSpeedModifier = 0.9,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module JCIO
|
||||
module TOC
|
||||
{
|
||||
model MetalHook
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module JCIO
|
||||
module TOC
|
||||
{
|
||||
imports
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 137 B After Width: | Height: | Size: 137 B |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 671 B After Width: | Height: | Size: 671 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 381 B After Width: | Height: | Size: 381 B |
|
Before Width: | Height: | Size: 683 B After Width: | Height: | Size: 683 B |
|
Before Width: | Height: | Size: 724 B After Width: | Height: | Size: 724 B |
|
Before Width: | Height: | Size: 843 B After Width: | Height: | Size: 843 B |
|
Before Width: | Height: | Size: 641 B After Width: | Height: | Size: 641 B |
|
Before Width: | Height: | Size: 671 B After Width: | Height: | Size: 671 B |
|
Before Width: | Height: | Size: 512 B After Width: | Height: | Size: 512 B |
|
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 298 B |
|
Before Width: | Height: | Size: 683 B After Width: | Height: | Size: 683 B |
|
Before Width: | Height: | Size: 724 B After Width: | Height: | Size: 724 B |
|
Before Width: | Height: | Size: 444 B After Width: | Height: | Size: 444 B |
|
Before Width: | Height: | Size: 677 B After Width: | Height: | Size: 677 B |
|
Before Width: | Height: | Size: 704 B After Width: | Height: | Size: 704 B |
|
Before Width: | Height: | Size: 617 B After Width: | Height: | Size: 617 B |
|
Before Width: | Height: | Size: 393 B After Width: | Height: | Size: 393 B |
|
Before Width: | Height: | Size: 541 B After Width: | Height: | Size: 541 B |
|
Before Width: | Height: | Size: 855 B After Width: | Height: | Size: 855 B |
|
Before Width: | Height: | Size: 513 B After Width: | Height: | Size: 513 B |
|
Before Width: | Height: | Size: 552 B After Width: | Height: | Size: 552 B |
|
Before Width: | Height: | Size: 893 B After Width: | Height: | Size: 893 B |
|
Before Width: | Height: | Size: 781 B After Width: | Height: | Size: 781 B |
|
Before Width: | Height: | Size: 842 B After Width: | Height: | Size: 842 B |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 671 B After Width: | Height: | Size: 671 B |
|
Before Width: | Height: | Size: 981 B After Width: | Height: | Size: 981 B |
|
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 282 B |
|
Before Width: | Height: | Size: 683 B After Width: | Height: | Size: 683 B |
|
Before Width: | Height: | Size: 724 B After Width: | Height: | Size: 724 B |
|
Before Width: | Height: | Size: 680 B After Width: | Height: | Size: 680 B |
|
Before Width: | Height: | Size: 658 B After Width: | Height: | Size: 658 B |
|
Before Width: | Height: | Size: 683 B After Width: | Height: | Size: 683 B |
|
Before Width: | Height: | Size: 521 B After Width: | Height: | Size: 521 B |
|
Before Width: | Height: | Size: 302 B After Width: | Height: | Size: 302 B |
|
Before Width: | Height: | Size: 692 B After Width: | Height: | Size: 692 B |
|
Before Width: | Height: | Size: 723 B After Width: | Height: | Size: 723 B |
|
Before Width: | Height: | Size: 445 B After Width: | Height: | Size: 445 B |
|
Before Width: | Height: | Size: 668 B After Width: | Height: | Size: 668 B |
|
Before Width: | Height: | Size: 691 B After Width: | Height: | Size: 691 B |
|
Before Width: | Height: | Size: 607 B After Width: | Height: | Size: 607 B |
|
Before Width: | Height: | Size: 389 B After Width: | Height: | Size: 389 B |
|
Before Width: | Height: | Size: 546 B After Width: | Height: | Size: 546 B |
|
Before Width: | Height: | Size: 864 B After Width: | Height: | Size: 864 B |
|
Before Width: | Height: | Size: 516 B After Width: | Height: | Size: 516 B |
|
Before Width: | Height: | Size: 557 B After Width: | Height: | Size: 557 B |
|
Before Width: | Height: | Size: 888 B After Width: | Height: | Size: 888 B |
|
Before Width: | Height: | Size: 771 B After Width: | Height: | Size: 771 B |
|
Before Width: | Height: | Size: 838 B After Width: | Height: | Size: 838 B |
|
Before Width: | Height: | Size: 885 B After Width: | Height: | Size: 885 B |
6
mod.info
@@ -1,9 +1,9 @@
|
||||
name=Just Cut It Out
|
||||
name=The Only Cure
|
||||
poster=generic.png
|
||||
require=UIAPI
|
||||
description=Bitten? Not a problem!
|
||||
id=JCIO
|
||||
id=TOC
|
||||
icon=icon.png
|
||||
url=https://github.com/ZioPao/The-Only-Cure-But-Better
|
||||
modversion=0.9.15
|
||||
modversion=1.0
|
||||
pzversion=41.65
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
version=1
|
||||
id=2915572347
|
||||
title=Just Cut It Out
|
||||
title=THE ONLY CURE
|
||||
description=TODO
|
||||
tags=
|
||||
visibility=public
|
||||