diff --git a/dev_stuff/ci/bump_minor_version.sh b/dev_stuff/ci/bump_minor_version.sh new file mode 100644 index 0000000..5d5e6c5 --- /dev/null +++ b/dev_stuff/ci/bump_minor_version.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Open the Main.lua file in read mode +while IFS= read -r line; do + # Check if the current line contains _version + if [[ $line == *_version* ]]; then + # Get the current version number from the line + current_version=$(echo $line | cut -d '"' -f 2) + + # Increment the version number by 1 + new_version=$((current_version + 1)) + + # Replace the old version number with the new one in the file + echo "$line" | sed "s/$current_version/$new_version/g" > media/lua/client/Main.lua + fi +done < media/lua/client/Main.lua + + +# Open the mod.info file in read mode +while IFS= read -r line; do + # Check if the current line contains modversion + if [[ $line == *modversion* ]]; then + # Get the current version number from the line + current_version=$(echo $line | cut -d '"' -f 2) + + # Increment the version number by 1 + new_version=$((current_version + 1)) + + # Replace the old version number with the new one in the file + echo "$line" | sed "s/$current_version/$new_version/g" > mod.info + fi +done < mod.info \ No newline at end of file diff --git a/media/lua/client/TOC/Controllers/LocalPlayerController.lua b/media/lua/client/TOC/Controllers/LocalPlayerController.lua index 2bed9fa..cb89535 100644 --- a/media/lua/client/TOC/Controllers/LocalPlayerController.lua +++ b/media/lua/client/TOC/Controllers/LocalPlayerController.lua @@ -58,12 +58,15 @@ function LocalPlayerController.ManageTraits() for k, v in pairs(StaticData.TRAITS_BP) do if playerObj:HasTrait(k) then -- Once we find one, we should be done since they're exclusive + TOC_DEBUG.print("Player has amputation trait " .. k .. ", executing it") local tempHandler = AmputationHandler:new(v, playerObj) tempHandler:execute(false) -- No damage tempHandler:close() -- The wound should be already cicatrized + local dcInst = DataController.GetInstance() LocalPlayerController.HandleSetCicatrization(DataController.GetInstance(), playerObj, v) + dcInst:apply() return end end @@ -310,7 +313,7 @@ end ---@param playerObj IsoPlayer ---@param limbName string function LocalPlayerController.HandleSetCicatrization(dcInst, playerObj, limbName) - TOC_DEBUG.print(tostring(limbName) .. " is cicatrized") + TOC_DEBUG.print("Setting cicatrization to " .. tostring(limbName)) dcInst:setIsCicatrized(limbName, true) dcInst:setCicatrizationTime(limbName, 0) diff --git a/media/lua/client/TOC/Handlers/AmputationHandler.lua b/media/lua/client/TOC/Handlers/AmputationHandler.lua index 97a776a..837168f 100644 --- a/media/lua/client/TOC/Handlers/AmputationHandler.lua +++ b/media/lua/client/TOC/Handlers/AmputationHandler.lua @@ -89,9 +89,12 @@ end ---@param stitchesItem InventoryItem ---@return ISStitch function AmputationHandler.PrepareStitchesAction(prevAction, limbName, surgeonPl, patientPl, stitchesItem) - local bptEnum = StaticData.LIMBS_TO_BODYLOCS_IND_BPT[limbName] local bd = patientPl:getBodyDamage() - local bodyPart = bd:getBodyPart(bptEnum) + + -- we need the adjacent one, not the actual one + local adjacentLimb = StaticData.LIMBS_ADJACENT_IND_STR[limbName] + local bodyPart = bd:getBodyPart(BodyPartType[adjacentLimb]) + local stitchesAction = ISStitch:new(surgeonPl, patientPl, stitchesItem, bodyPart, true) ISTimedActionQueue.addAfter(prevAction, stitchesAction) @@ -106,9 +109,11 @@ end ---@param bandageItem InventoryItem ---@return ISApplyBandage function AmputationHandler.PrepareBandagesAction(prevAction, limbName, surgeonPl, patientPl, bandageItem) - local bptEnum = StaticData.LIMBS_TO_BODYLOCS_IND_BPT[limbName] local bd = patientPl:getBodyDamage() - local bodyPart = bd:getBodyPart(bptEnum) + -- we need the adjacent one, not the actual one + local adjacentLimb = StaticData.LIMBS_ADJACENT_IND_STR[limbName] + local bodyPart = bd:getBodyPart(BodyPartType[adjacentLimb]) + local bandageAction = ISApplyBandage:new(surgeonPl, patientPl, bandageItem, bodyPart, true) ISTimedActionQueue.addAfter(prevAction, bandageAction) diff --git a/media/lua/client/TOC/Main.lua b/media/lua/client/TOC/Main.lua index d13207c..022c607 100644 --- a/media/lua/client/TOC/Main.lua +++ b/media/lua/client/TOC/Main.lua @@ -6,7 +6,7 @@ require("TOC/Events") ---@class Main local Main = { - _version = "2.0.14" + _version = "2.0.15" } function Main.Start() diff --git a/media/lua/client/TOC/UI/Interactions/CutLimbInteractionHandler.lua b/media/lua/client/TOC/UI/Interactions/CutLimbInteractionHandler.lua index f7aed06..f6ccbad 100644 --- a/media/lua/client/TOC/UI/Interactions/CutLimbInteractionHandler.lua +++ b/media/lua/client/TOC/UI/Interactions/CutLimbInteractionHandler.lua @@ -38,9 +38,8 @@ local function GetStitchesConsumableItem(player) -- Suture needle has priority local sutureNeedle = plInv:FindAndReturn("Base.SutureNeedle") - ---@cast sutureNeedle DrainableComboItem - if sutureNeedle and sutureNeedle:getUsedDelta() > 0 then + if sutureNeedle then return sutureNeedle else -- Didn't find the suture one, so let's search for the normal one + thread diff --git a/media/lua/shared/Translate/KO/ContextMenu_KO.txt b/media/lua/shared/Translate/KO/ContextMenu_KO.txt new file mode 100644 index 0000000..1ffd8dd Binary files /dev/null and b/media/lua/shared/Translate/KO/ContextMenu_KO.txt differ diff --git a/media/lua/shared/Translate/KO/IG_UI_KO.txt b/media/lua/shared/Translate/KO/IG_UI_KO.txt new file mode 100644 index 0000000..422da48 Binary files /dev/null and b/media/lua/shared/Translate/KO/IG_UI_KO.txt differ diff --git a/media/lua/shared/Translate/KO/ItemName_KO.txt b/media/lua/shared/Translate/KO/ItemName_KO.txt new file mode 100644 index 0000000..852dd6c Binary files /dev/null and b/media/lua/shared/Translate/KO/ItemName_KO.txt differ diff --git a/media/lua/shared/Translate/KO/Recipes_KO.txt b/media/lua/shared/Translate/KO/Recipes_KO.txt new file mode 100644 index 0000000..fa60f4b Binary files /dev/null and b/media/lua/shared/Translate/KO/Recipes_KO.txt differ diff --git a/media/lua/shared/Translate/KO/Sandbox_KO.txt b/media/lua/shared/Translate/KO/Sandbox_KO.txt new file mode 100644 index 0000000..98607ba Binary files /dev/null and b/media/lua/shared/Translate/KO/Sandbox_KO.txt differ diff --git a/media/lua/shared/Translate/KO/Tooltip_KO.txt b/media/lua/shared/Translate/KO/Tooltip_KO.txt new file mode 100644 index 0000000..384abbc Binary files /dev/null and b/media/lua/shared/Translate/KO/Tooltip_KO.txt differ diff --git a/media/lua/shared/Translate/KO/UI_KO.txt b/media/lua/shared/Translate/KO/UI_KO.txt new file mode 100644 index 0000000..9854970 Binary files /dev/null and b/media/lua/shared/Translate/KO/UI_KO.txt differ diff --git a/media/lua/shared/Translate/UA/ContextMenu_UA.txt b/media/lua/shared/Translate/UA/ContextMenu_UA.txt new file mode 100644 index 0000000..74b5477 --- /dev/null +++ b/media/lua/shared/Translate/UA/ContextMenu_UA.txt @@ -0,0 +1,33 @@ +ContextMenu_UA = { + ContextMenu_Amputate = "Ампутувати", + ContextMenu_Amputate_Bandage = "Ампутувати та перев'язати", + ContextMenu_Amputate_Stitch = "Ампутувати та накласти шви", + ContextMenu_Amputate_Stitch_Bandage = "Ампутувати, накласти шви та перев'язати", + + ContextMenu_Cauterize = "Припекти", + + ContextMenu_Limb_Hand_L = "Ліва Рука", + ContextMenu_Limb_ForeArm_L = "Ліве Передпліччя", + ContextMenu_Limb_UpperArm_L = "Ліве Плече" + ContextMenu_Limb_Hand_R = "Права Рука", + ContextMenu_Limb_ForeArm_R = "Праве Передпліччя", + ContextMenu_Limb_UpperArm_R = "Праве Плече", + + ContextMenu_InstallProstRight = "Установити протез на праву руку", + ContextMenu_InstallProstLeft = "Установити протез на ліву руку", + + ContextMenu_PutTourniquetArmLeft = "Накласти джгут на ліву руку", + ContextMenu_PutTourniquetLegL = "Накласти джгут на ліву ногу", + ContextMenu_PutTourniquetArmRight = "Накласти джгут на праву руку", + ContextMenu_PutTourniquetLegR = "Накласти джгут на праву ногу", + + + ContextMenu_CleanWound = "Очистити рану", + + + + ContextMenu_Admin_TOC = "TOC", + ContextMenu_Admin_ResetTOC = "Скинути Ампутації", + ContextMenu_Admin_ForceAmputation = "Примусово Ампутувати", + +} diff --git a/media/lua/shared/Translate/UA/IG_UI_UA.txt b/media/lua/shared/Translate/UA/IG_UI_UA.txt new file mode 100644 index 0000000..c32e243 --- /dev/null +++ b/media/lua/shared/Translate/UA/IG_UI_UA.txt @@ -0,0 +1,18 @@ +IG_UI_UA = { + IGUI_perks_Amputations = "Ампутації", + IGUI_perks_Side_R = "Права сторона", + IGUI_perks_Side_L = "Ліва сторона", + IGUI_perks_Prosthesis = "Протез", + IGUI_perks_ProstFamiliarity= "Пристосованість", + + IGUI_ItemCat_Prosthesis = "Протез", + IGUI_ItemCat_Surgery = "Хірургія", + IGUI_ItemCat_Amputation = "Ампутація" + + IGUI_HealthPanel_Cicatrization = "Рубцювання", + IGUI_HealthPanel_Cicatrized = "Зарубцьована", + IGUI_HealthPanel_Cauterized = "Припечена", + IGUI_HealthPanel_WoundDirtyness = "Забруднена рана", + IGUI_HealthPanel_ProstEquipped = "Протез установлено", + +} \ No newline at end of file diff --git a/media/lua/shared/Translate/UA/ItemName_UA.txt b/media/lua/shared/Translate/UA/ItemName_UA.txt new file mode 100644 index 0000000..32a0a72 --- /dev/null +++ b/media/lua/shared/Translate/UA/ItemName_UA.txt @@ -0,0 +1,11 @@ +ItemName_UA = { + + ItemName_TOC.Surg_Arm_Tourniquet_L = "Джгут", + ItemName_TOC.Surg_Arm_Tourniquet_R = "Джгут", + + ItemName_TOC.Prost_NormalArm_L = "Протез Руки", + ItemName_TOC.Prost_NormalArm_R = "Протез Руки", + + ItemName_TOC.Prost_HookArm_L = "Протез Руки - Гак", + ItemName_TOC.Prost_HookArm_R = "Протез Руки - Гак", +} \ No newline at end of file diff --git a/media/lua/shared/Translate/UA/Recipes_UA.txt b/media/lua/shared/Translate/UA/Recipes_UA.txt new file mode 100644 index 0000000..c170f77 --- /dev/null +++ b/media/lua/shared/Translate/UA/Recipes_UA.txt @@ -0,0 +1,4 @@ +Recipes_UA = { + Recipe_Craft_Prosthetic_Arm = "Створити Протез Руки", + Recipe_Craft_Prosthetic_Hook = "Створити Протез Руки - Гак", +} \ No newline at end of file diff --git a/media/lua/shared/Translate/UA/Sandbox_UA.txt b/media/lua/shared/Translate/UA/Sandbox_UA.txt new file mode 100644 index 0000000..ff5d557 --- /dev/null +++ b/media/lua/shared/Translate/UA/Sandbox_UA.txt @@ -0,0 +1,7 @@ +Sandbox_UA = { + Sandbox_TOC = "The Only Cure", + Sandbox_TOC_CicatrizationSpeed = "Швидкість рубцювання", + Sandbox_TOC_WoundDirtynessMultiplier = "Множник забруднення рани", + Sandbox_TOC_SurgeonAbilityImportance = "Важливість медичних навичок лікаря", + +} \ No newline at end of file diff --git a/media/lua/shared/Translate/UA/Tooltip_UA.txt b/media/lua/shared/Translate/UA/Tooltip_UA.txt new file mode 100644 index 0000000..1bc8ded --- /dev/null +++ b/media/lua/shared/Translate/UA/Tooltip_UA.txt @@ -0,0 +1,10 @@ +Tooltip_UA = { + + Tooltip_Surgery_CantCauterize = "Не можна припекти рану", + + Tooltip_Surgery_And = " та " + Tooltip_Surgery_TempTooLow = "Температура занадто низька", + Tooltip_Surgery_Coward = "Вам не вистачає сміливості зробити це", + Tooltip_Surgery_LimbNotFree = "Спочатку необхідно зняти протез", + +} \ No newline at end of file diff --git a/mod.info b/mod.info index 1136077..76d768c 100644 --- a/mod.info +++ b/mod.info @@ -4,5 +4,5 @@ description=You've been bitten. You have only two choices. id=TheOnlyCure icon=icon.png url=https://github.com/ZioPao/The-Only-Cure -modversion=2.0.14 +modversion=2.0.15 pzversion=41.65 diff --git a/workshop_files/workshop.txt b/workshop_files/workshop.txt index 44cd678..d94e56f 100644 --- a/workshop_files/workshop.txt +++ b/workshop_files/workshop.txt @@ -1,95 +1,185 @@ -version=1 -id=3236152598 -title=The Only Cure - Rebuilt -description=[img]https://raw.githubusercontent.com/ZioPao/The-Only-Cure/551125bb50cb65608ad89ca81ef0daccb3b02c4c/dev_stuff/logos/title.png[/img] -description= -description= -description=[h1]You're bitten. You have two choices.[/h1] -description=Wait until you succumb to the virus or take matters into your hands. Cut off that infected part and live to die another day. -description= -description=This version of [b]The Only Cure[/b] has been rebuilt from scratch to support future additions and to feel as close as possible as a vanilla mechanic. -description= -description=[b]If you're using an older version of The Only Cure and want to switch with this, you're gonna need to create a new character\save to prevent issues.[/b] -description=[b]The older version will be delisted shortly and it will not be supported anymore.[/b] -description=[h1]Supports [b]Single Player[/b] and [b]Multiplayer[/b]. Host Mode is currently [b]UNSUPPORTED![/b][/h1] -description= -description=[h1]Setup[/h1] -description=Use it with the following mods for the intended experience: -description=[list] -description=[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2904920097]Fancy Handwork[/url] -description=[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2934621024]Brutal Handwork[/url] -description=[/list] -description= -description=Place them [b]BEFORE[/b] The Only Cure in your mod list! -description= -description=[hr][/hr] -description= -description=[h1]Quick guide[/h1] -description=[h2]Amputation[/h2] -description=Get a [i]Saw[/i] or a [i]Garden Saw[/i], right click on it, and choose which limb to amputate. You can also drag n' drop your Saw item directly into the afflicted area to start cutting it off. -description= -description=If you have some [i]bandages[/i] and\or [i]stitches[/i] in your inventory you will automatically use them, multiplying the chances of your survival. -description=If you have a [i]tourniquet[/i], place it on the correct side to dampen the amount of damage you will take after you're done amputating the limb. -description= -description=Keep in mind that if you amputate your [b]upper arm[/b], you won't be able to equip any prosthesis. -description= -description=After you've amputated a limb, you will gain [b]skill points[/b] for the amputated side, making timed actions faster in due time. -description= -description=[h2]Cicatrization[/h2] -description=You can check the cicatrization status of an amputated limb from your [b]Health Panel[/b] -description=From time to time, you should clean your wounds with a bandage to help the cicatrization process. -description=If your limb isn't completely cicatrized, you can still equip prosthetic limbs, but that can trigger random bleedings from that area. -description= -description=[h2]Prosthetics[/h2] -description=If you're missing a hand, you won't be able to do a lot of things, such as equipping two-handed weapons. With prosthetics limbs, you can fix that. -description=There are two prosthesis type that can be crafted\found in medical areas: -description=[list] -description=[*] Hook Prosthesis -description=[*] Arm Prosthesis -description=[/list] -description= -description=The main difference between the twos is that your actions will take longer with the Hook Prosthesis. -description=When you equip a prosthetic limb, you will slowly gain skill points in the [b]Prosthesis Familiarity[/b] perk, making actions more speedy in due time. -description= -description=[h2]Admin tools[/h2] -description=If something strange happened, an admin can reset TOC mechanics on any player by right clicking on them and select [i]"Reset Amputations"[/i]. They could also do the opposite by clicking on [i]"Force Amputation"[/i] for each amputable limb. -description= -description=[hr][/hr] -description= -description=[h1]Issues and bugs?[/h1] -description=Got any issues or found some pesky bugs? Report them on GitHub! -description= -description=[url=https://github.com/ZioPao/The-Only-Cure][img]https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white[/img][/url] -description= -description=[h1]Credits[/h1] -description=[table] -description= [tr] -description= [th]Pao[/th] -description= [th]Developer[/th] -description= [/tr] -description= [tr] -description= [th]Mr. Bounty[/th] -description= [th]Original Developer[/th] -description= [/tr] -description= [tr] -description= [th]Chuckleberry Finn[/th] -description= [th]Logo and Icon[/th] -description= [/tr] -description= [tr] -description= [th]dhert[/th] -description= [th]Compatibility API[/th] -description= [/tr] -description= [tr] -description= [th]JCloudJalix[/th] -description= [th]German Translation[/th] -description= [/tr] -description=[/table] -description= -description=[hr][/hr] -description= -description=[h1]Want to support me?[/h1] -description=[url=https://ko-fi.com/M4M7IERNW][img]https://storage.ko-fi.com/cdn/kofi3.png[/img][/url] -description= -description=[hr][/hr] -tags=Build 41;Balance;Interface;Items;Misc;Multiplayer;Realistic;Textures -visibility=public +version=1 +id=3236152598 +title=The Only Cure - Rebuilt +description=[img]https://raw.githubusercontent.com/ZioPao/The-Only-Cure/551125bb50cb65608ad89ca81ef0daccb3b02c4c/dev_stuff/logos/title.png[/img] + +description= + +description= + +description=[h1]You're bitten. You have two choices.[/h1] + +description=Wait until you succumb to the virus or take matters into your hands. Cut off that infected part and live to die another day. + +description= + +description=This version of [b]The Only Cure[/b] has been rebuilt from scratch to support future additions and to feel as close as possible as a vanilla mechanic. + +description= + +description=[b]If you're using an older version of The Only Cure and want to switch with this, you're gonna need to create a new character\save to prevent issues.[/b] + +description=[b]The older version will be delisted shortly and it will not be supported anymore.[/b] + +description=[h1]Supports [b]Single Player[/b] and [b]Multiplayer[/b]. Host Mode is currently [b]UNSUPPORTED![/b][/h1] + +description= + +description=[h1]Setup[/h1] + +description=Use it with the following mods for the intended experience: + +description=[list] + +description=[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2904920097]Fancy Handwork[/url] + +description=[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2934621024]Brutal Handwork[/url] + +description=[/list] + +description= + +description=Place them [b]BEFORE[/b] The Only Cure in your mod list! + +description= + +description=[hr][/hr] + +description= + +description=[h1]Quick guide[/h1] + +description=[h2]Amputation[/h2] + +description=Get a [i]Saw[/i] or a [i]Garden Saw[/i], right click on it, and choose which limb to amputate. You can also drag n' drop your Saw item directly into the afflicted area to start cutting it off. + +description= + +description=If you have some [i]bandages[/i] and\or [i]stitches[/i] in your inventory you will automatically use them, multiplying the chances of your survival. + +description=If you have a [i]tourniquet[/i], place it on the correct side to dampen the amount of damage you will take after you're done amputating the limb. + +description= + +description=Keep in mind that if you amputate your [b]upper arm[/b], you won't be able to equip any prosthesis. + +description= + +description=After you've amputated a limb, you will gain [b]skill points[/b] for the amputated side, making timed actions faster in due time. + +description= + +description=[h2]Cicatrization[/h2] + +description=You can check the cicatrization status of an amputated limb from your [b]Health Panel[/b] + +description=From time to time, you should clean your wounds with a bandage to help the cicatrization process. + +description=If your limb isn't completely cicatrized, you can still equip prosthetic limbs, but that can trigger random bleedings from that area. + +description= + +description=[h2]Prosthetics[/h2] + +description=If you're missing a hand, you won't be able to do a lot of things, such as equipping two-handed weapons. With prosthetics limbs, you can fix that. + +description=There are two prosthesis type that can be crafted\found in medical areas: + +description=[list] + +description=[*] Hook Prosthesis + +description=[*] Arm Prosthesis + +description=[/list] + +description= + +description=The main difference between the twos is that your actions will take longer with the Hook Prosthesis. + +description=When you equip a prosthetic limb, you will slowly gain skill points in the [b]Prosthesis Familiarity[/b] perk, making actions more speedy in due time. + +description= + +description=[h2]Admin tools[/h2] + +description=If something strange happened, an admin can reset TOC mechanics on any player by right clicking on them and select [i]"Reset Amputations"[/i]. They could also do the opposite by clicking on [i]"Force Amputation"[/i] for each amputable limb. + +description= + +description=[hr][/hr] + +description= + +description=[h1]Issues and bugs?[/h1] + +description=Got any issues or found some pesky bugs? Report them on GitHub! + +description= + +description=[url=https://github.com/ZioPao/The-Only-Cure][img]https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white[/img][/url] + +description= + +description=[h1]Credits[/h1] + +description=[table] + +description= [tr] + +description= [th]Pao[/th] + +description= [th]Developer[/th] + +description= [/tr] + +description= [tr] + +description= [th]Mr. Bounty[/th] + +description= [th]Original Developer[/th] + +description= [/tr] + +description= [tr] + +description= [th]Chuckleberry Finn[/th] + +description= [th]Logo and Icon[/th] + +description= [/tr] + +description= [tr] + +description= [th]dhert[/th] + +description= [th]Compatibility API[/th] + +description= [/tr] + +description= [tr] + +description= [th]JCloudJalix, Rinary1[/th] + +description= [th]Translations[/th] + +description= [/tr] + +description=[/table] + +description= + +description=[hr][/hr] + +description= + +description=[h1]Want to support me?[/h1] + +description=[url=https://ko-fi.com/M4M7IERNW][img]https://storage.ko-fi.com/cdn/kofi3.png[/img][/url] + +description= + +description=[hr][/hr] + +tags=Build 41;Balance;Interface;Items;Misc;Multiplayer;Realistic;Textures +visibility=public