Merge pull request #93 from ZioPao/dev

v2.0.15
This commit is contained in:
Pao
2024-07-13 19:30:30 +02:00
committed by GitHub
20 changed files with 316 additions and 104 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -6,7 +6,7 @@ require("TOC/Events")
---@class Main
local Main = {
_version = "2.0.14"
_version = "2.0.15"
}
function Main.Start()

View File

@@ -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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -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 = "Ïðèìóñîâî Àìïóòóâàòè",
}

View File

@@ -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 = "Ďđîňĺç óńňŕíîâëĺíî",
}

View File

@@ -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 = "Ïðîòåç Ðóêè - Ãàê",
}

View File

@@ -0,0 +1,4 @@
Recipes_UA = {
Recipe_Craft_Prosthetic_Arm = "Створити Протез Руки",
Recipe_Craft_Prosthetic_Hook = "Створити Протез Руки - Гак",
}

View File

@@ -0,0 +1,7 @@
Sandbox_UA = {
Sandbox_TOC = "The Only Cure",
Sandbox_TOC_CicatrizationSpeed = "Øâèäê³ñòü ðóáöþâàííÿ",
Sandbox_TOC_WoundDirtynessMultiplier = "Ìíîæíèê çàáðóäíåííÿ ðàíè",
Sandbox_TOC_SurgeonAbilityImportance = "Âàæëèâ³ñòü ìåäè÷íèõ íàâè÷îê ë³êàðÿ",
}

View File

@@ -0,0 +1,10 @@
Tooltip_UA = {
Tooltip_Surgery_CantCauterize = "Не можна припекти рану",
Tooltip_Surgery_And = " та "
Tooltip_Surgery_TempTooLow = "Температура занадто низька",
Tooltip_Surgery_Coward = "Вам не вистачає сміливості зробити це",
Tooltip_Surgery_LimbNotFree = "Спочатку необхідно зняти протез",
}

View File

@@ -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

View File

@@ -2,94 +2,184 @@ 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=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= [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