diff --git a/dev_stuff/logos/workshop_img.psd b/dev_stuff/logos/workshop_img.psd new file mode 100644 index 0000000..db63f5c Binary files /dev/null and b/dev_stuff/logos/workshop_img.psd differ diff --git a/media/lua/client/TOC/Admin.lua b/media/lua/client/TOC/Admin.lua index e85a4ea..0c53760 100644 --- a/media/lua/client/TOC/Admin.lua +++ b/media/lua/client/TOC/Admin.lua @@ -44,3 +44,20 @@ local function AddAdminTocOptions(playerNum, context, worldobjects) end end Events.OnFillWorldObjectContextMenu.Add(AddAdminTocOptions) + + +--* Override to cheats to fix stuff + +local og_ISHealthPanel_onCheatCurrentPlayer = ISHealthPanel.onCheatCurrentPlayer + +function ISHealthPanel.onCheatCurrentPlayer(bodyPart, action, player) + og_ISHealthPanel_onCheatCurrentPlayer(bodyPart, action, player) + + if action == "healthFullBody" then + -- todo loop all limbs and reset them if infected + end + + if action == "healthFull" then + -- todo get limbname from bodypart + end +end \ 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 0625d5d..3e92de4 100644 --- a/media/lua/client/TOC/Controllers/DataController.lua +++ b/media/lua/client/TOC/Controllers/DataController.lua @@ -252,6 +252,13 @@ function DataController:getIsCauterized(limbName) return self.tocData.limbs[limbName].isCauterized end +---Get isInfected +---@param limbName string +---@return boolean +function DataController:getIsInfected(limbName) + return self.tocData.limbs[limbName].isInfected +end + ---Get woundDirtyness ---@param limbName string ---@return number diff --git a/media/lua/client/TOC/Controllers/LocalPlayerController.lua b/media/lua/client/TOC/Controllers/LocalPlayerController.lua index 7ef118f..a0ee4a7 100644 --- a/media/lua/client/TOC/Controllers/LocalPlayerController.lua +++ b/media/lua/client/TOC/Controllers/LocalPlayerController.lua @@ -158,7 +158,7 @@ function LocalPlayerController.HandleDamage(character) LocalPlayerController.HealZombieInfection(bd, bodyPart, limbName, dcInst) end else - if bodyPart:bitten() or bodyPart:IsInfected() then + if (bodyPart:bitten() or bodyPart:IsInfected()) and not dcInst:getIsInfected(limbName) then dcInst:setIsInfected(limbName, true) modDataNeedsUpdate = true end diff --git a/media/scripts/TOC_models.txt b/media/scripts/TOC_models.txt index 8831612..6960471 100644 --- a/media/scripts/TOC_models.txt +++ b/media/scripts/TOC_models.txt @@ -11,7 +11,6 @@ module TOC texture = Prosthesis\normalArm, } - model prostheticArmHook { mesh = Prosthesis/hookArm_Ground, diff --git a/media/scripts/TOC_surgery_items.txt b/media/scripts/TOC_surgery_items.txt index 47d58cb..02c115c 100644 --- a/media/scripts/TOC_surgery_items.txt +++ b/media/scripts/TOC_surgery_items.txt @@ -18,7 +18,7 @@ module TOC BodyLocation = TOC_ArmAccessory, BloodLocation = UpperArms;UpperBody, - Weight = 1, + Weight = 0.25, Icon = tourniquet, WorldStaticModel = tourniquet, @@ -38,7 +38,7 @@ module TOC BodyLocation = TOC_ArmAccessory, BloodLocation = UpperArms;UpperBody, - Weight = 1, + Weight = 0.25, Icon = tourniquet, WorldStaticModel = tourniquet, diff --git a/workshop_files/imgs/Screenshot 2024-05-02 011034.png b/workshop_files/imgs/Screenshot 2024-05-02 011034.png new file mode 100644 index 0000000..e2ed19d Binary files /dev/null and b/workshop_files/imgs/Screenshot 2024-05-02 011034.png differ diff --git a/workshop_files/imgs/Screenshot 2024-05-02 011054.png b/workshop_files/imgs/Screenshot 2024-05-02 011054.png new file mode 100644 index 0000000..22fcb12 Binary files /dev/null and b/workshop_files/imgs/Screenshot 2024-05-02 011054.png differ diff --git a/workshop_files/imgs/Untitled-1.png b/workshop_files/imgs/Untitled-1.png new file mode 100644 index 0000000..19ad1a1 Binary files /dev/null and b/workshop_files/imgs/Untitled-1.png differ