Readded tourniquet
This commit is contained in:
10
media/clothing/clothingItems/Surg_Arm_Tourniquet_L.xml
Normal file
10
media/clothing/clothingItems/Surg_Arm_Tourniquet_L.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<clothingItem>
|
||||
<m_MaleModel>Surgery\Tourniquet_Left</m_MaleModel>
|
||||
<m_FemaleModel>Surgery\Tourniquet_Left</m_FemaleModel>
|
||||
<m_GUID>afbab35d-8bd4-4d61-87c7-054651ead1bd</m_GUID>
|
||||
<m_Static>false</m_Static>
|
||||
<m_AllowRandomHue>false</m_AllowRandomHue>
|
||||
<m_AllowRandomTint>false</m_AllowRandomTint>
|
||||
<textureChoices>Surgery\tourniquet</textureChoices>
|
||||
</clothingItem>
|
||||
10
media/clothing/clothingItems/Surg_Arm_Tourniquet_R.xml
Normal file
10
media/clothing/clothingItems/Surg_Arm_Tourniquet_R.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<clothingItem>
|
||||
<m_MaleModel>Surgery\Tourniquet_Right</m_MaleModel>
|
||||
<m_FemaleModel>Surgery\Tourniquet_Right</m_FemaleModel>
|
||||
<m_GUID>9a5fe063-63c7-4e6f-81ca-ee77c6678e0d</m_GUID>
|
||||
<m_Static>false</m_Static>
|
||||
<m_AllowRandomHue>false</m_AllowRandomHue>
|
||||
<m_AllowRandomTint>false</m_AllowRandomTint>
|
||||
<textureChoices>Surgery\tourniquet</textureChoices>
|
||||
</clothingItem>
|
||||
@@ -26,6 +26,7 @@
|
||||
<guid>646cafa5-3fa1-41af-9ca0-aa57cca3b36d</guid>
|
||||
</files>
|
||||
|
||||
<!--Prosthetics -->
|
||||
|
||||
<files>
|
||||
<path>media/clothing/clothingItems/Prost_HookArm_L.xml</path>
|
||||
@@ -44,4 +45,17 @@
|
||||
<path>media/clothing/clothingItems/Prost_NormalArm_R.xml</path>
|
||||
<guid>0e24eb76-4745-46af-9147-ba21e0ebbb2e</guid>
|
||||
</files>
|
||||
|
||||
<!--Surgery -->
|
||||
|
||||
<files>
|
||||
<path>media/clothing/clothingItems/Surg_Arm_Tourniquet_L.xml</path>
|
||||
<guid>afbab35d-8bd4-4d61-87c7-054651ead1bd</guid>
|
||||
</files>
|
||||
<files>
|
||||
<path>media/clothing/clothingItems/Surg_Arm_Tourniquet_R.xml</path>
|
||||
<guid>9a5fe063-63c7-4e6f-81ca-ee77c6678e0d</guid>
|
||||
</files>
|
||||
|
||||
|
||||
</fileGuidTable>
|
||||
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 }
|
||||
|
||||
@@ -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",
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
|
||||
BIN
media/models_X/Surgery/Tourniquet_Left.fbx
Normal file
BIN
media/models_X/Surgery/Tourniquet_Left.fbx
Normal file
Binary file not shown.
BIN
media/models_X/Surgery/Tourniquet_Right.fbx
Normal file
BIN
media/models_X/Surgery/Tourniquet_Right.fbx
Normal file
Binary file not shown.
48
media/scripts/TOC_surgery_items.txt
Normal file
48
media/scripts/TOC_surgery_items.txt
Normal file
@@ -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,
|
||||
}
|
||||
|
||||
}
|
||||
BIN
media/textures/item_tourniquet.png
Normal file
BIN
media/textures/item_tourniquet.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1016 B |
Reference in New Issue
Block a user