diff --git a/media/clothing/clothingItems/Surg_Arm_Tourniquet_L.xml b/media/clothing/clothingItems/Surg_Arm_Tourniquet_L.xml
new file mode 100644
index 0000000..54a61e2
--- /dev/null
+++ b/media/clothing/clothingItems/Surg_Arm_Tourniquet_L.xml
@@ -0,0 +1,10 @@
+
+
+ Surgery\Tourniquet_Left
+ Surgery\Tourniquet_Left
+ afbab35d-8bd4-4d61-87c7-054651ead1bd
+ false
+ false
+ false
+ Surgery\tourniquet
+
\ No newline at end of file
diff --git a/media/clothing/clothingItems/Surg_Arm_Tourniquet_R.xml b/media/clothing/clothingItems/Surg_Arm_Tourniquet_R.xml
new file mode 100644
index 0000000..f3117b8
--- /dev/null
+++ b/media/clothing/clothingItems/Surg_Arm_Tourniquet_R.xml
@@ -0,0 +1,10 @@
+
+
+ Surgery\Tourniquet_Right
+ Surgery\Tourniquet_Right
+ 9a5fe063-63c7-4e6f-81ca-ee77c6678e0d
+ false
+ false
+ false
+ Surgery\tourniquet
+
\ No newline at end of file
diff --git a/media/fileGuidTable.xml b/media/fileGuidTable.xml
index dc49a98..8f282c0 100644
--- a/media/fileGuidTable.xml
+++ b/media/fileGuidTable.xml
@@ -26,6 +26,7 @@
646cafa5-3fa1-41af-9ca0-aa57cca3b36d
+
media/clothing/clothingItems/Prost_HookArm_L.xml
@@ -44,4 +45,17 @@
media/clothing/clothingItems/Prost_NormalArm_R.xml
0e24eb76-4745-46af-9147-ba21e0ebbb2e
+
+
+
+
+ media/clothing/clothingItems/Surg_Arm_Tourniquet_L.xml
+ afbab35d-8bd4-4d61-87c7-054651ead1bd
+
+
+ media/clothing/clothingItems/Surg_Arm_Tourniquet_R.xml
+ 9a5fe063-63c7-4e6f-81ca-ee77c6678e0d
+
+
+
\ No newline at end of file
diff --git a/media/lua/client/TOC/Controllers/DataController.lua b/media/lua/client/TOC/Controllers/DataController.lua
index 95d3651..892ac33 100644
--- a/media/lua/client/TOC/Controllers/DataController.lua
+++ b/media/lua/client/TOC/Controllers/DataController.lua
@@ -57,7 +57,7 @@ function DataController:setup(key)
prostheses = {}
}
- ---@type partData
+ ---@type partDataType
local defaultParams = {
isCut = false, isInfected = false, isOperated = false, isCicatrized = false, isCauterized = false,
woundDirtyness = -1, cicatrizationTime = -1,
@@ -269,9 +269,7 @@ function DataController:setCutLimb(limbName, isOperated, isCicatrized, isCauteri
cicatrizationTime = StaticData.LIMBS_CICATRIZATION_TIME_IND_NUM[limbName] - surgeonFactor
end
- -- TODO Set WoundDirtyness here! For now it's just 0
-
- ---@type partData
+ ---@type partDataType
local params = {isCut = true, isInfected = false, isOperated = isOperated, isCicatrized = isCicatrized, isCauterized = isCauterized, woundDirtyness = 0, isVisible = true}
self:setLimbParams(limbName, params, cicatrizationTime)
@@ -292,7 +290,7 @@ end
---Set a limb data
---@param limbName string
----@param ampStatus partData {isCut, isInfected, isOperated, isCicatrized, isCauterized, isVisible}
+---@param ampStatus partDataType {isCut, isInfected, isOperated, isCicatrized, isCauterized, isVisible}
---@param cicatrizationTime integer?
function DataController:setLimbParams(limbName, ampStatus, cicatrizationTime)
local limbData = self.tocData.limbs[limbName]
diff --git a/media/lua/client/TOC/Controllers/LocalPlayerController.lua b/media/lua/client/TOC/Controllers/LocalPlayerController.lua
index 1109085..d002058 100644
--- a/media/lua/client/TOC/Controllers/LocalPlayerController.lua
+++ b/media/lua/client/TOC/Controllers/LocalPlayerController.lua
@@ -117,7 +117,6 @@ function LocalPlayerController.TryRandomBleed(character, limbName)
-- Chance should be determined by the cicatrization time
local cicTime = DataController.GetInstance():getCicatrizationTime(limbName)
if cicTime == 0 then return end
- -- TODO Sometimes we get cicTime = 0... Shouldn't really do it
-- TODO This is just a placeholder, we need to figure out a better way to calculate this chance
local normCicTime = CommonMethods.Normalize(cicTime, 0, StaticData.LIMBS_CICATRIZATION_TIME_IND_NUM[limbName])/2
diff --git a/media/lua/client/TOC/TimedActions/CutLimbAction.lua b/media/lua/client/TOC/TimedActions/CutLimbAction.lua
index 0d87126..d9f41b0 100644
--- a/media/lua/client/TOC/TimedActions/CutLimbAction.lua
+++ b/media/lua/client/TOC/TimedActions/CutLimbAction.lua
@@ -1,7 +1,6 @@
require "TimedActions/ISBaseTimedAction"
local AmputationHandler = require("TOC/Handlers/AmputationHandler")
local CommandsData = require("TOC/CommandsData")
-local CommonMethods = require("TOC/CommonMethods")
-----------------------------
@@ -46,8 +45,7 @@ function CutLimbAction:new(surgeon, patient, limbName, item, stitchesItem, banda
end
function CutLimbAction:isValid()
- -- TODO Surgeon should be close to patient
- return true
+ return not ISHealthPanel.DidPatientMove(self.patient, self.character, self.patient:getX(), self.patient:getY())
end
function CutLimbAction:start()
diff --git a/media/lua/shared/TOC/StaticData.lua b/media/lua/shared/TOC/StaticData.lua
index 3e682b3..f27d2da 100644
--- a/media/lua/shared/TOC/StaticData.lua
+++ b/media/lua/shared/TOC/StaticData.lua
@@ -1,5 +1,5 @@
----@alias partData { isCut : boolean?, isInfected : boolean?, isOperated : boolean?, isCicatrized : boolean?, isCauterized : boolean?, isVisible : boolean?, woundDirtyness : number, cicatrizationTime : number }
----@alias limbsTable {Hand_L : partData, ForeArm_L : partData, UpperArm_L : partData, Hand_R : partData, ForeArm_R : partData, UpperArm_R : partData }
+---@alias partDataType { isCut : boolean?, isInfected : boolean?, isOperated : boolean?, isCicatrized : boolean?, isCauterized : boolean?, isVisible : boolean?, woundDirtyness : number, cicatrizationTime : number }
+---@alias limbsTable {Hand_L : partDataType, ForeArm_L : partDataType, UpperArm_L : partDataType, Hand_R : partDataType, ForeArm_R : partDataType, UpperArm_R : partDataType }
---@alias prosthesisData {isProstEquipped : boolean, prostFactor : number }
---@alias prosthesesTable {Top_L : prosthesisData, Top_R : prosthesisData } -- TODO add Bottom_L and Bottom_R
---@alias tocModDataType { limbs : limbsTable, prostheses : prosthesesTable, isIgnoredPartInfected : boolean, isAnyLimbCut : boolean }
diff --git a/media/lua/shared/Translate/EN/ContextMenu_EN.txt b/media/lua/shared/Translate/EN/ContextMenu_EN.txt
index 14a6d45..f7acdc1 100644
--- a/media/lua/shared/Translate/EN/ContextMenu_EN.txt
+++ b/media/lua/shared/Translate/EN/ContextMenu_EN.txt
@@ -12,13 +12,17 @@ ContextMenu_EN = {
ContextMenu_Limb_UpperArm_L = "Left UpperArm"
ContextMenu_Limb_Hand_R = "Right Hand",
ContextMenu_Limb_ForeArm_R = "Right Forearm",
- ContextMenu_Limb_UpperArm_R = "Right UpperArm"
-
+ ContextMenu_Limb_UpperArm_R = "Right UpperArm",
ContextMenu_InstallProstRight = "Install prosthesis on right arm",
ContextMenu_InstallProstLeft = "Install prosthesis on left arm",
+ ContextMenu_PutTourniquetArmLeft = "Put tourniquet on left arm",
+ ContextMenu_PutTourniquetLegL = "Put tourniquet on left leg",
+ ContextMenu_PutTourniquetArmRight = "Put tourniquet on right arm",
+ ContextMenu_PutTourniquetLegR = "Put tourniquet on right leg",
+
+
ContextMenu_CleanWound = "Clean Wound",
-
-}
+}
diff --git a/media/lua/shared/Translate/EN/ItemName_EN.txt b/media/lua/shared/Translate/EN/ItemName_EN.txt
index 4900de1..43022b0 100644
--- a/media/lua/shared/Translate/EN/ItemName_EN.txt
+++ b/media/lua/shared/Translate/EN/ItemName_EN.txt
@@ -1,4 +1,8 @@
ItemName_EN = {
+
+ ItemName_TOC.Surg_Arm_Tourniquet_L = "Tourniquet",
+ ItemName_TOC.Surg_Arm_Tourniquet_R = "Tourniquet",
+
ItemName_TOC.Prost_NormalArm_L = "Prosthetic Arm",
ItemName_TOC.Prost_NormalArm_R = "Prosthetic Arm",
diff --git a/media/models_X/Surgery/Tourniquet_Left.fbx b/media/models_X/Surgery/Tourniquet_Left.fbx
new file mode 100644
index 0000000..d87eb83
Binary files /dev/null and b/media/models_X/Surgery/Tourniquet_Left.fbx differ
diff --git a/media/models_X/Surgery/Tourniquet_Right.fbx b/media/models_X/Surgery/Tourniquet_Right.fbx
new file mode 100644
index 0000000..c807f3f
Binary files /dev/null and b/media/models_X/Surgery/Tourniquet_Right.fbx differ
diff --git a/media/scripts/TOC_surgery_items.txt b/media/scripts/TOC_surgery_items.txt
new file mode 100644
index 0000000..2255d6d
--- /dev/null
+++ b/media/scripts/TOC_surgery_items.txt
@@ -0,0 +1,48 @@
+module TOC
+{
+ imports
+ {
+ Base
+ }
+
+ item Surg_Arm_Tourniquet_L
+ {
+ Type = Clothing,
+ DisplayCategory = Surgery,
+ DisplayName = Tourniquet,
+
+ ClothingItem = Surg_Arm_Tourniquet_L,
+ ClothingItemExtra = Surg_Arm_Tourniquet_R,
+ ClothingItemExtraOption = PutTourniquetArmRight,
+ clothingExtraSubmenu = PutTourniquetArmLeft,
+ BodyLocation = Hands,
+ BloodLocation = UpperArms;UpperBody,
+
+ Weight = 1,
+
+ Icon = tourniquet,
+ Tooltip = Test,
+ CanHaveHoles = false,
+ }
+
+ item Surg_Arm_Tourniquet_R
+ {
+ Type = Clothing,
+ DisplayCategory = Surgery,
+ DisplayName = Tourniquet,
+
+ ClothingItem = Surg_Arm_Tourniquet_R,
+ ClothingItemExtra = Surg_Arm_Tourniquet_L,
+ ClothingItemExtraOption = PutTourniquetArmLeft,
+ clothingExtraSubmenu = PutTourniquetArmRight,
+ BodyLocation = Hands,
+ BloodLocation = UpperArms;UpperBody,
+
+ Weight = 1,
+
+ Icon = tourniquet,
+ Tooltip = Test,
+ CanHaveHoles = false,
+ }
+
+}
\ No newline at end of file
diff --git a/media/textures/item_tourniquet.png b/media/textures/item_tourniquet.png
new file mode 100644
index 0000000..3d93b04
Binary files /dev/null and b/media/textures/item_tourniquet.png differ