From b25f52a40d94ca03c13013fad6c169d45d2c0e15 Mon Sep 17 00:00:00 2001 From: pllq <94574845+pllq@users.noreply.github.com> Date: Sun, 9 Jun 2024 23:54:59 +0300 Subject: [PATCH 1/8] Add files via upload Ukrainian localization for the TOC mod --- .../shared/Translate/UA/ContextMenu_UA.txt | 33 +++++++++++++++++++ media/lua/shared/Translate/UA/IG_UI_UA.txt | 18 ++++++++++ media/lua/shared/Translate/UA/ItemName_UA.txt | 11 +++++++ media/lua/shared/Translate/UA/Recipes_UA.txt | 4 +++ media/lua/shared/Translate/UA/Sandbox_UA.txt | 7 ++++ media/lua/shared/Translate/UA/Tooltip_UA.txt | 10 ++++++ 6 files changed, 83 insertions(+) create mode 100644 media/lua/shared/Translate/UA/ContextMenu_UA.txt create mode 100644 media/lua/shared/Translate/UA/IG_UI_UA.txt create mode 100644 media/lua/shared/Translate/UA/ItemName_UA.txt create mode 100644 media/lua/shared/Translate/UA/Recipes_UA.txt create mode 100644 media/lua/shared/Translate/UA/Sandbox_UA.txt create mode 100644 media/lua/shared/Translate/UA/Tooltip_UA.txt 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 From 2b41745a059caf307499a4058eac9f73af15cecc Mon Sep 17 00:00:00 2001 From: ZioPao Date: Sat, 13 Jul 2024 17:26:04 +0200 Subject: [PATCH 2/8] Added Korean translation --- .../shared/Translate/KO/ContextMenu_KO.txt | Bin 0 -> 2030 bytes media/lua/shared/Translate/KO/IG_UI_KO.txt | Bin 0 -> 1080 bytes media/lua/shared/Translate/KO/ItemName_KO.txt | Bin 0 -> 610 bytes media/lua/shared/Translate/KO/Recipes_KO.txt | Bin 0 -> 220 bytes media/lua/shared/Translate/KO/Sandbox_KO.txt | Bin 0 -> 496 bytes media/lua/shared/Translate/KO/Tooltip_KO.txt | Bin 0 -> 526 bytes media/lua/shared/Translate/KO/UI_KO.txt | Bin 0 -> 920 bytes workshop_files/workshop.txt | 280 ++++++++++++------ 8 files changed, 185 insertions(+), 95 deletions(-) create mode 100644 media/lua/shared/Translate/KO/ContextMenu_KO.txt create mode 100644 media/lua/shared/Translate/KO/IG_UI_KO.txt create mode 100644 media/lua/shared/Translate/KO/ItemName_KO.txt create mode 100644 media/lua/shared/Translate/KO/Recipes_KO.txt create mode 100644 media/lua/shared/Translate/KO/Sandbox_KO.txt create mode 100644 media/lua/shared/Translate/KO/Tooltip_KO.txt create mode 100644 media/lua/shared/Translate/KO/UI_KO.txt 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 0000000000000000000000000000000000000000..1ffd8dd081e905743b8483520df3457871921d82 GIT binary patch literal 2030 zcmb`IPfG$(6vfZdf}n*#ix!V)BeZDQriBSnWE5uPPRu3~a{6ZwW#6Gq(57XJKw2mS z27(5efR9KRV0Jcc_6?$V zmPdB*UlEp>agui&n-2WG=j1;XSot0FutK6JqdDqQ=|X^2GJ2q4kBW}k^{SPsljRYJ zLd~I4D&!z}DXh^Mv(0`)5o}efk}01mceqWOq4)Nfqn~SvWDBq1y}jy!xIz!^Nc9d( zh=%v(g4AyHhJN*q6%Ko%*hcJ`W*hZawYmRPw9j$B?bAguZ1GxRcedqwh#p9AkEE@2 zXn60RARZ!j!(1=xKIN{tMG3Nh8--(5D{9Gj-Yg)=`7+n=sF~K#SXaQ$MHLoDg%}m!7f_jk6D;RDODec=TLP myo8nahBZrbO2)~zpRq|+MsH=G9jbD=%ZPs!7*#njs{R94E1A0h literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..422da483bc4062d33fbf721457b808b00d24f266 GIT binary patch literal 1080 zcmbW0%SyvQ6o&t$2rk@Ja1lxu3O;}v7gBFU!D11!5JIp)gT0xwV7l-CyI4cY1a)Q;NQclcK{EEisJ<6Cg^WPH}T}|$6k0FLr*v_C?w8lT}`x&+SJ#ud*pd7H)k_SKR8SGte= K)sQ-3w)fxD?8epr literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..852dd6c5f57758016c2207ed708df530d4ce0906 GIT binary patch literal 610 zcmezOpTU!%gdvq7m%)!A5lE&o#4~s^_%kRl*aC4i11|#?7%KpIAc(0t1gP4XL60Gr zp_HMBAswjS5lH6(=@5o|uvi{LCPN{Rl?t>ep1}ub3dn4wlLxMGY-V6kV$h+o4M8|; z0QrTmKLUWR&u1tGyVVcK0{JD8AqVa&xciSs9Ficx^@PlYyBft@(%tLP;UuC2GEQWpjpX4QAeO?F4QEY;}M4>7!*#(9G}Rb#GpfwxgJ2f@)@#WCSN;p LA%{T$i}|$x2r?_X literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..98607bab912145b1309c95a9249400e299da83d6 GIT binary patch literal 496 zcmezOpCOnbks*&Eg&~O{pP_;wp23^JpFx4a7Kp1Ecp12WGz6ln3jwNghN@ILu5i5O zY7B$IxriNS_Dp3^V$dN%Z#+PgdkhXq5N&rb(EK8XbfCE)pE&|UIumRU$PJzhxjX pa|weR(EL(~Ut0zK!Lz&M@l zXlGT#umc4uRW4y4Q5@5Em?DHV${b*?b6e(WsqR!EV|qlK5MhN8$8Hx3)y1+Q-Pw-;LiZMK1UGw3d&zy!6d4Z~lVDYkmFA0J8E7d- z`3E~csTU=7v3`E~do5zzj=<|Do{O1KrXdMsbh{X|@?b_Y2eU?cF+Jm452cllycVbK z#asAM!3q6!G$JPt%647wyH*w;E47_p=o#e<7(m6 bc;fRyU!JOZoNbx~X=_?$9 Date: Sat, 13 Jul 2024 17:27:48 +0200 Subject: [PATCH 3/8] bump to mod.info --- media/lua/client/TOC/Main.lua | 2 +- mod.info | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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/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 From f2446c0781f80f82fb8eca753888fa59f3c09f7b Mon Sep 17 00:00:00 2001 From: ZioPao Date: Sat, 13 Jul 2024 18:57:10 +0200 Subject: [PATCH 4/8] Added script to automatically bump version --- dev_stuff/ci/bump_minor_version.sh | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 dev_stuff/ci/bump_minor_version.sh 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 From 6c82f1a96f6b7d689b9a85d144ce6e16f94cc2e9 Mon Sep 17 00:00:00 2001 From: ZioPao Date: Sat, 13 Jul 2024 18:57:16 +0200 Subject: [PATCH 5/8] Add logs for traits --- media/lua/client/TOC/Controllers/LocalPlayerController.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/media/lua/client/TOC/Controllers/LocalPlayerController.lua b/media/lua/client/TOC/Controllers/LocalPlayerController.lua index 2bed9fa..0b2bbf9 100644 --- a/media/lua/client/TOC/Controllers/LocalPlayerController.lua +++ b/media/lua/client/TOC/Controllers/LocalPlayerController.lua @@ -58,6 +58,7 @@ 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() From a3287bb2bc73c1aed547f0edef8944852adaa049 Mon Sep 17 00:00:00 2001 From: ZioPao Date: Sat, 13 Jul 2024 19:07:17 +0200 Subject: [PATCH 6/8] Fixed suture needle causing an error --- .../client/TOC/UI/Interactions/CutLimbInteractionHandler.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 From 2f82021b5d1d264815a5af6a7ce17ddd48d6408f Mon Sep 17 00:00:00 2001 From: ZioPao Date: Sat, 13 Jul 2024 19:13:18 +0200 Subject: [PATCH 7/8] Fixed bandage\stitches action after amputation applying to wrong body part --- media/lua/client/TOC/Handlers/AmputationHandler.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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) From 3dad820014a5bcefdc994a6b3e467ddf49848ff7 Mon Sep 17 00:00:00 2001 From: ZioPao Date: Sat, 13 Jul 2024 19:27:55 +0200 Subject: [PATCH 8/8] Fixed cicatrization force-applying with traits --- media/lua/client/TOC/Controllers/LocalPlayerController.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/media/lua/client/TOC/Controllers/LocalPlayerController.lua b/media/lua/client/TOC/Controllers/LocalPlayerController.lua index 0b2bbf9..cb89535 100644 --- a/media/lua/client/TOC/Controllers/LocalPlayerController.lua +++ b/media/lua/client/TOC/Controllers/LocalPlayerController.lua @@ -64,7 +64,9 @@ function LocalPlayerController.ManageTraits() tempHandler:close() -- The wound should be already cicatrized + local dcInst = DataController.GetInstance() LocalPlayerController.HandleSetCicatrization(DataController.GetInstance(), playerObj, v) + dcInst:apply() return end end @@ -311,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)