21 Commits
v2.1.7 ... main

Author SHA1 Message Date
Pao
ec87d128e4 Merge pull request #217 from ZioPao/dev
v2.2.2
2025-11-15 21:38:24 +01:00
ZioPao
be4588fc43 chore: bump to mod version - 2.2.2 2025-10-12 17:45:09 +02:00
ZioPao
4bafb3a15c fix: went back to previous look for amputations 2025-10-12 17:16:52 +02:00
ZioPao
fd056aea1e fix: amputation items not hiding anymore 2025-10-09 22:32:41 +02:00
ZioPao
100abab2aa fix: workshop.txt 2025-10-05 16:17:55 +02:00
ZioPao
789b0635e0 fix: workshop.txt for b42 2025-10-05 16:08:56 +02:00
ZioPao
d6d9ba7028 Bump to mod version 2025-10-05 16:03:21 +02:00
ZioPao
a182fb07e5 chore: updates to workshop files for b42 2025-10-04 18:55:48 +02:00
ZioPao
528a43247a add: better wound textures 2025-10-04 16:38:50 +02:00
ZioPao
b281ce7d12 add: gen_amp_textures 2025-10-04 16:38:25 +02:00
ZioPao
9db3a1c944 fix: better masks for amputations 2025-10-04 15:40:10 +02:00
ZioPao
a74e33134d fix: switched to multiple body locs to fix some old issues and prepare for better visuals overhaul 2025-10-04 02:32:48 +02:00
ZioPao
1caf4a4b49 fix: fix for cheat prevention with both hands feasibility to false 2025-09-30 01:01:41 +02:00
ZioPao
5f71cebdc0 fix: override for both hands interaction for b42 and cheat prevention 2025-09-30 00:58:37 +02:00
ZioPao
4714bd7b82 fix: recipes 2025-09-30 00:53:15 +02:00
ZioPao
4d20cc2559 fix: baseline recipes for b42 2025-09-29 02:03:00 +02:00
ZioPao
5ec0ec1a9b fix: 42.12 new bodyloc 2025-09-29 01:31:18 +02:00
ZioPao
89a28e846a refactor: cleaning 2025-09-29 01:04:08 +02:00
ZioPao
a511ac777a refactor: reorganized settings for cd 2025-07-14 02:46:43 +02:00
ZioPao
04c7172d82 refactor: removed old code 2025-07-14 01:15:39 +02:00
Pao
b5266cd7cd Merge pull request #200 from ZioPao/dev
v2.1.7
2025-04-17 16:18:41 +02:00
91 changed files with 362 additions and 184 deletions

3
.gitignore vendored
View File

@@ -1 +1,2 @@
/media dev_stuff/gen_amp_textures/.venv
dev_stuff/gen_amp_textures/output

8
.vscode/tasks.json vendored
View File

@@ -6,14 +6,14 @@
{ {
"label": "Create Workshop folder", "label": "Create Workshop folder",
"type": "shell", "type": "shell",
"options": {"statusbar": {"label": "$(combine) Assemble Mod"}}, "options": {"statusbar": {"label": "$(combine) Assemble Mod - B42"}},
"command": "python ${config:zomboid_user_folder}/PaosCrap/make_workshop_pack.py \"picch\" \"${workspaceFolderBasename}\" \"\"", "command": "python ${config:zomboid_user_folder}/PaosCrap/make_workshop_pack.py \"42\" \"picch\" \"${workspaceFolderBasename}\" \"\"",
}, },
{ {
"label": "Create Workshop folder", "label": "Create Workshop folder",
"type": "shell", "type": "shell",
"options": {"statusbar": {"label": "$(combine) Assemble Mod (B41 ONLY)"}}, "options": {"statusbar": {"label": "$(combine) Assemble Mod - B41"}},
"command": "python ${config:zomboid_user_folder}/PaosCrap/make_workshop_pack_b41.py \"picch\" \"${workspaceFolderBasename}\"", "command": "python ${config:zomboid_user_folder}/PaosCrap/make_workshop_pack.py \"41\" \"picch\" \"${workspaceFolderBasename}\" \"\"",
}, },
{ {
"label": "Create Workshop folder", "label": "Create Workshop folder",

View File

@@ -4,7 +4,7 @@ local OverridenMethodsArchive = require("TOC/OverridenMethodsArchive")
local og_ISClothingExtraAction_isValid = OverridenMethodsArchive.Get("ISClothingExtraAction_isValid") local og_ISClothingExtraAction_isValid = OverridenMethodsArchive.Get("ISClothingExtraAction_isValid")
---@diagnostic disable-next-line: duplicate-set-field ---@diagnostic disable-next-line: duplicate-set-field
function ISClothingExtraAction:isValid() function ISClothingExtraAction:isValid()
TOC_DEBUG.print("Inside ISClothingExtraAction:isValid 42") -- TOC_DEBUG.print("Inside ISClothingExtraAction:isValid 42")
TOC_DEBUG.print(OverridenMethodsArchive.Get("ISClothingExtraAction_isValid")) -- TOC_DEBUG.print(OverridenMethodsArchive.Get("ISClothingExtraAction_isValid"))
return LimitActionsController.WrapClothingAction(self, og_ISClothingExtraAction_isValid, instanceItem(self.extra)) return LimitActionsController.WrapClothingAction(self, og_ISClothingExtraAction_isValid, instanceItem(self.extra))
end end

View File

@@ -25,16 +25,16 @@ local og_ISUnequipAction_complete = ISUnequipAction.complete
function ISUnequipAction:complete() function ISUnequipAction:complete()
-- Horrendous workaround. For B42, as of now, it will basically happen two times, once with :perform and once with :complete. Shouldn't -- Horrendous workaround. For B42, as of now, it will basically happen two times, once with :perform and once with :complete. Shouldn't
-- matter for performance but it's really ugly. -- matter for performance but it's really ugly.
local isProst = ProsthesisHandler.SearchAndSetupProsthesis(self.item, false) -- local isProst = ProsthesisHandler.SearchAndSetupProsthesis(self.item, false)
local group -- local group
if isProst then -- if isProst then
group = BodyLocations.getGroup("Human") -- group = BodyLocations.getGroup("Human")
group:setMultiItem("TOC_ArmProst", false) -- group:setMultiItem("TOC_ArmProst", false)
end -- end
og_ISUnequipAction_complete(self) og_ISUnequipAction_complete(self)
if isProst then -- if isProst then
group:setMultiItem("TOC_ArmProst", true) -- group:setMultiItem("TOC_ArmProst", true)
end -- end
end end

View File

@@ -0,0 +1,53 @@
module TOC
{
imports
{
Base
}
/*************Craft Prosthetics*******************/
craftRecipe Craft Prosthetic Arm
{
timedAction = BuildMetalStructureSmall,
Time = 150,
Tags = InHandCraft,
category = Welding,
NeedToBeLearn = false,
SkillRequired = MetalWelding:4,
xpAward = MetalWelding:50,
inputs
{
item 4 [MetalPipe],
item 2 [Plank],
item 4 [Base.BlowTorch] flags[DontRecordInput],
item 4 [Base.WeldingRods] flags[DontRecordInput],
}
outputs
{
item 1 TOC.Prost_NormalArm_L,
}
}
craftRecipe Craft Prosthetic Hook
{
timedAction = BuildMetalStructureSmall,
Time = 100,
Tags = InHandCraft,
category = Welding,
NeedToBeLearn = false,
SkillRequired = MetalWelding:2,
xpAward = MetalWelding:30,
inputs
{
item 2 [MetalPipe],
item 1 [Plank],
item 4 [Base.BlowTorch] flags[DontRecordInput],
item 2 [Base.WeldingRods] flags[DontRecordInput],
}
outputs
{
item 1 TOC.Prost_HookArm_L,
}
}
}

View File

@@ -4,7 +4,7 @@ description=You've been bitten. You have only two choices.
id=TheOnlyCure id=TheOnlyCure
icon=icon.png icon=icon.png
url=https://github.com/ZioPao/The-Only-Cure url=https://github.com/ZioPao/The-Only-Cure
modversion=2.2 modversion=2.2.2
versionMin=42.6 versionMin=42.6
loadModAfter=\FancyHandwork,\BrutalHandwork,\TwoWeaponsOnBackRework loadModAfter=\FancyHandwork,\BrutalHandwork,\TwoWeaponsOnBackRework

View File

@@ -7,9 +7,10 @@
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint> <m_AllowRandomTint>false</m_AllowRandomTint>
<m_Masks>3</m_Masks>
<m_Masks>4</m_Masks> <m_Masks>4</m_Masks>
<m_Masks>3</m_Masks>
<!-- <m_UnderlayMasksFolder>media/textures/Amputations/Masks</m_UnderlayMasksFolder> -->
<!-- HUMAN --> <!-- HUMAN -->

View File

@@ -10,6 +10,8 @@
<m_Masks>5</m_Masks> <m_Masks>5</m_Masks>
<m_Masks>6</m_Masks> <m_Masks>6</m_Masks>
<!-- <m_UnderlayMasksFolder>media/textures/Amputations/Masks</m_UnderlayMasksFolder> -->
<!-- HUMAN --> <!-- HUMAN -->
<textureChoices>Amputations\Human\Forearm\skin01_b</textureChoices> <textureChoices>Amputations\Human\Forearm\skin01_b</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin02_b</textureChoices> <textureChoices>Amputations\Human\Forearm\skin02_b</textureChoices>

View File

@@ -7,18 +7,33 @@
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint> <m_AllowRandomTint>false</m_AllowRandomTint>
<m_Masks>4</m_Masks> <m_Masks>4</m_Masks>
<m_MasksFolder>none</m_MasksFolder> <!-- <m_MasksFolder>none</m_MasksFolder> -->
<!-- HUMAN --> <!-- HUMAN -->
<textureChoices>Amputations\Human\Forearm\skin01_b</textureChoices> <textureChoices>Amputations\Human\Hand\skin01_b</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin02_b</textureChoices> <textureChoices>Amputations\Human\Hand\skin02_b</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin03_b</textureChoices> <textureChoices>Amputations\Human\Hand\skin03_b</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin04_b</textureChoices> <textureChoices>Amputations\Human\Hand\skin04_b</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin05_b</textureChoices> <textureChoices>Amputations\Human\Hand\skin05_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin01_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin02_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin03_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin04_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Hand\skin05_hairy_b</textureChoices>
<!-- HUMAN AFTER CICATRIZATION -->
<textureChoices>Body\MaleBody01</textureChoices>
<textureChoices>Body\MaleBody02</textureChoices>
<textureChoices>Body\MaleBody03</textureChoices>
<textureChoices>Body\MaleBody04</textureChoices>
<textureChoices>Body\MaleBody05</textureChoices>
<textureChoices>Body\MaleBody01a</textureChoices>
<textureChoices>Body\MaleBody02a</textureChoices>
<textureChoices>Body\MaleBody03a</textureChoices>
<textureChoices>Body\MaleBody04</textureChoices>
<textureChoices>Body\MaleBody05a</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin01_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin02_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin03_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin04_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin05_hairy_b</textureChoices>
</clothingItem> </clothingItem>

View File

@@ -6,18 +6,32 @@
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint> <m_AllowRandomTint>false</m_AllowRandomTint>
<m_Masks>6</m_Masks> <m_Masks>6</m_Masks>
<m_MasksFolder>none</m_MasksFolder> <!-- <m_MasksFolder>none</m_MasksFolder> -->
<!-- HUMAN --> <!-- HUMAN -->
<textureChoices>Amputations\Human\Forearm\skin01_b</textureChoices> <textureChoices>Amputations\Human\Hand\skin01_b</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin02_b</textureChoices> <textureChoices>Amputations\Human\Hand\skin02_b</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin03_b</textureChoices> <textureChoices>Amputations\Human\Hand\skin03_b</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin04_b</textureChoices> <textureChoices>Amputations\Human\Hand\skin04_b</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin05_b</textureChoices> <textureChoices>Amputations\Human\Hand\skin05_b</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin01_hairy_b</textureChoices> <textureChoices>Amputations\Human\Hand\skin01_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin02_hairy_b</textureChoices> <textureChoices>Amputations\Human\Hand\skin02_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin03_hairy_b</textureChoices> <textureChoices>Amputations\Human\Hand\skin03_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin04_hairy_b</textureChoices> <textureChoices>Amputations\Human\Hand\skin04_hairy_b</textureChoices>
<textureChoices>Amputations\Human\Forearm\skin05_hairy_b</textureChoices> <textureChoices>Amputations\Human\Hand\skin05_hairy_b</textureChoices>
<!-- HUMAN AFTER CICATRIZATION -->
<textureChoices>Body\MaleBody01</textureChoices>
<textureChoices>Body\MaleBody02</textureChoices>
<textureChoices>Body\MaleBody03</textureChoices>
<textureChoices>Body\MaleBody04</textureChoices>
<textureChoices>Body\MaleBody05</textureChoices>
<textureChoices>Body\MaleBody01a</textureChoices>
<textureChoices>Body\MaleBody02a</textureChoices>
<textureChoices>Body\MaleBody03a</textureChoices>
<textureChoices>Body\MaleBody04</textureChoices>
<textureChoices>Body\MaleBody05a</textureChoices>
</clothingItem> </clothingItem>

View File

@@ -9,6 +9,8 @@
<m_Masks>3</m_Masks> <m_Masks>3</m_Masks>
<m_Masks>4</m_Masks> <m_Masks>4</m_Masks>
<!-- <m_UnderlayMasksFolder>media/textures/Amputations/Masks</m_UnderlayMasksFolder> -->
<!-- HUMAN --> <!-- HUMAN -->
<textureChoices>Amputations\Human\Upperarm\skin01_b</textureChoices> <textureChoices>Amputations\Human\Upperarm\skin01_b</textureChoices>
<textureChoices>Amputations\Human\Upperarm\skin02_b</textureChoices> <textureChoices>Amputations\Human\Upperarm\skin02_b</textureChoices>

View File

@@ -8,6 +8,7 @@
<m_AllowRandomTint>false</m_AllowRandomTint> <m_AllowRandomTint>false</m_AllowRandomTint>
<m_Masks>5</m_Masks> <m_Masks>5</m_Masks>
<m_Masks>6</m_Masks> <m_Masks>6</m_Masks>
<!-- <m_UnderlayMasksFolder>media/textures/Amputations/Masks</m_UnderlayMasksFolder> -->
<!-- HUMAN --> <!-- HUMAN -->
<textureChoices>Amputations\Human\Upperarm\skin01_b</textureChoices> <textureChoices>Amputations\Human\Upperarm\skin01_b</textureChoices>

View File

@@ -57,7 +57,6 @@ function DataController:setup(key)
---@type tocModDataType ---@type tocModDataType
self.tocData = { self.tocData = {
-- Generic stuff that does not belong anywhere else -- Generic stuff that does not belong anywhere else
isInitializing = true,
isIgnoredPartInfected = false, isIgnoredPartInfected = false,
isAnyLimbCut = false, isAnyLimbCut = false,
limbs = {}, limbs = {},
@@ -93,10 +92,6 @@ function DataController:setup(key)
-- Sync with the server -- Sync with the server
self:apply() self:apply()
-- -- Disable lock
-- self.tocData.isInitializing = false
-- ModData.add(key, self.tocData)
triggerEvent("OnSetupTocData") triggerEvent("OnSetupTocData")
end end
@@ -339,14 +334,11 @@ end
---@param cicatrizationTime integer? ---@param cicatrizationTime integer?
function DataController:setLimbParams(limbName, ampStatus, cicatrizationTime) function DataController:setLimbParams(limbName, ampStatus, cicatrizationTime)
local limbData = self.tocData.limbs[limbName] local limbData = self.tocData.limbs[limbName]
if ampStatus.isCut ~= nil then limbData.isCut = ampStatus.isCut end for k, v in pairs(ampStatus) do
if ampStatus.isInfected ~= nil then limbData.isInfected = ampStatus.isInfected end if v ~= nil then
if ampStatus.isOperated ~= nil then limbData.isOperated = ampStatus.isOperated end limbData[k] = v
if ampStatus.isCicatrized ~= nil then limbData.isCicatrized = ampStatus.isCicatrized end end
if ampStatus.isCauterized ~= nil then limbData.isCauterized = ampStatus.isCauterized end end
if ampStatus.woundDirtyness ~= nil then limbData.woundDirtyness = ampStatus.woundDirtyness end
if ampStatus.isVisible ~= nil then limbData.isVisible = ampStatus.isVisible end
if cicatrizationTime ~= nil then limbData.cicatrizationTime = cicatrizationTime end if cicatrizationTime ~= nil then limbData.cicatrizationTime = cicatrizationTime end
end end

View File

@@ -17,7 +17,6 @@ ItemsController.Player = {}
---@return number ---@return number
---@private ---@private
function ItemsController.Player.GetAmputationTexturesIndex(playerObj, isCicatrized) function ItemsController.Player.GetAmputationTexturesIndex(playerObj, isCicatrized)
-- FIX Broken
local textureString = playerObj:getHumanVisual():getSkinTexture() local textureString = playerObj:getHumanVisual():getSkinTexture()
local isHairy = textureString:sub(-1) == "a" local isHairy = textureString:sub(-1) == "a"
@@ -79,13 +78,16 @@ end
---Deletes all the old amputation items, used for resets ---Deletes all the old amputation items, used for resets
---@param playerObj IsoPlayer ---@param playerObj IsoPlayer
function ItemsController.Player.DeleteAllOldAmputationItems(playerObj) function ItemsController.Player.DeleteAllOldAmputationItems(playerObj)
-- TODO Fix visual bug
-- This part is a workaround for a pretty shitty implementation on the java side. Check ProsthesisHandler for more infos -- This part is a workaround for a pretty shitty implementation on the java side. Check ProsthesisHandler for more infos
local group = BodyLocations.getGroup("Human") -- local group = BodyLocations.getGroup("Human")
group:setMultiItem("TOC_Arm", false) -- group:setMultiItem("TOC_Arm", false)
group:setMultiItem("TOC_ArmProst", false) -- group:setMultiItem("TOC_ArmProst", false)
for i = 1, #StaticData.LIMBS_STR do for i = 1, #StaticData.LIMBS_STR do
local limbName = StaticData.LIMBS_STR[i] local limbName = StaticData.LIMBS_STR[i]
-- TODO Won't work with dedicated clothingItems for multi amps
local clothItemName = StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName local clothItemName = StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName
local clothItem = playerObj:getInventory():FindAndReturn(clothItemName) local clothItem = playerObj:getInventory():FindAndReturn(clothItemName)
---@cast clothItem InventoryItem ---@cast clothItem InventoryItem
@@ -94,8 +96,8 @@ function ItemsController.Player.DeleteAllOldAmputationItems(playerObj)
-- Reset model just in case -- Reset model just in case
playerObj:resetModel() playerObj:resetModel()
group:setMultiItem("TOC_Arm", true) -- group:setMultiItem("TOC_Arm", true)
group:setMultiItem("TOC_ArmProst", true) -- group:setMultiItem("TOC_ArmProst", true)
end end
---Spawns and equips the correct amputation item to the player. ---Spawns and equips the correct amputation item to the player.

View File

@@ -36,11 +36,12 @@ end
-- We need to override when the player changes key binds manually to be sure that TOC changes are re-applied
local og_MainOptions_apply = MainOptions.apply
function MainOptions:apply(closeAfter)
og_MainOptions_apply(self, closeAfter)
CachedDataHandler.OverrideBothHandsFeasibility()
end
-------------------------------------------- --------------------------------------------

View File

@@ -64,18 +64,18 @@ end
---@param obj any self ---@param obj any self
---@param wrappedFunc function ---@param wrappedFunc function
function TourniquetController.WrapClothingAction(obj, wrappedFunc) function TourniquetController.WrapClothingAction(obj, wrappedFunc)
local isTourniquet = TourniquetController.IsItemTourniquet(obj.item:getFullType()) -- local isTourniquet = TourniquetController.IsItemTourniquet(obj.item:getFullType())
local group -- local group
if isTourniquet then -- if isTourniquet then
group = BodyLocations.getGroup("Human") -- group = BodyLocations.getGroup("Human")
group:setMultiItem(TourniquetController.bodyLoc, false) -- group:setMultiItem(TourniquetController.bodyLoc, false)
end -- end
local ogValue = wrappedFunc(obj) local ogValue = wrappedFunc(obj)
if isTourniquet then -- if isTourniquet then
group:setMultiItem(TourniquetController.bodyLoc, true) -- group:setMultiItem(TourniquetController.bodyLoc, true)
end -- end
return ogValue -- Needed for isValid return ogValue -- Needed for isValid
end end

View File

@@ -23,7 +23,7 @@ end
function CachedDataHandler.CalculateCacheableValues(username) function CachedDataHandler.CalculateCacheableValues(username)
CachedDataHandler.CalculateHighestAmputatedLimbs(username) CachedDataHandler.CalculateHighestAmputatedLimbs(username)
if getPlayer():getUsername() == username then if getPlayer():getUsername() == username then
CachedDataHandler.CalculateBothHandsFeasibility() CachedDataHandler.OverrideBothHandsFeasibility()
end end
end end
@@ -130,14 +130,13 @@ function CachedDataHandler.GetHandFeasibility(side)
-- FIX horrendous workaround, but with a forced init we run the caching too early and it breaks this, setting it to nil. -- FIX horrendous workaround, but with a forced init we run the caching too early and it breaks this, setting it to nil.
if CachedDataHandler.handFeasibility[side] == nil then if CachedDataHandler.handFeasibility[side] == nil then
CachedDataHandler.CalculateBothHandsFeasibility() CachedDataHandler.OverrideBothHandsFeasibility()
end end
return CachedDataHandler.handFeasibility[side] return CachedDataHandler.handFeasibility[side]
end end
function CachedDataHandler.OverrideBothHandsFeasibility()
function CachedDataHandler.CalculateBothHandsFeasibility()
CachedDataHandler.CalculateHandFeasibility("Hand_L") CachedDataHandler.CalculateHandFeasibility("Hand_L")
CachedDataHandler.CalculateHandFeasibility("Hand_R") CachedDataHandler.CalculateHandFeasibility("Hand_R")
local interactStr = "Interact" local interactStr = "Interact"
@@ -151,13 +150,23 @@ function CachedDataHandler.CalculateBothHandsFeasibility()
if not CachedDataHandler.GetBothHandsFeasibility() then if not CachedDataHandler.GetBothHandsFeasibility() then
TOC_DEBUG.print("Disabling interact key") TOC_DEBUG.print("Disabling interact key")
TOC_DEBUG.print("Cached current key for interact: " .. tostring(CachedDataHandler.interactKey)) TOC_DEBUG.print("Cached current key for interact: " .. tostring(CachedDataHandler.interactKey))
getCore():addKeyBinding(interactStr, Keyboard.KEY_NONE)
else
TOC_DEBUG.print("Re-enabling interact key")
TOC_DEBUG.print("Cached current key for interact: " .. tostring(CachedDataHandler.interactKey))
if StaticData.COMPAT_42 then
getCore():addKeyBinding(interactStr, Keyboard.KEY_NONE, 0, false, false, false)
else
getCore():addKeyBinding(interactStr, Keyboard.KEY_NONE)
end
else
--TOC_DEBUG.print("Re-enabling interact key")
--TOC_DEBUG.print("Cached current key for interact: " .. tostring(CachedDataHandler.interactKey))
if StaticData.COMPAT_42 then
getCore():addKeyBinding(interactStr, CachedDataHandler.interactKey, 0, false, false, false)
else
getCore():addKeyBinding(interactStr, CachedDataHandler.interactKey) getCore():addKeyBinding(interactStr, CachedDataHandler.interactKey)
end end
end
end end
function CachedDataHandler.GetBothHandsFeasibility() function CachedDataHandler.GetBothHandsFeasibility()
@@ -165,3 +174,4 @@ function CachedDataHandler.GetBothHandsFeasibility()
end end
return CachedDataHandler return CachedDataHandler

View File

@@ -9,8 +9,8 @@ local OverridenMethodsArchive = require("TOC/OverridenMethodsArchive")
---@class ProsthesisHandler ---@class ProsthesisHandler
local ProsthesisHandler = {} local ProsthesisHandler = {}
local bodyLocArmProst = StaticData.MOD_BODYLOCS_BASE_IND_STR.TOC_ArmProst local bodylocArmProstBaseline = "TOC_ArmProst"
local bodyLocLegProst = StaticData.MOD_BODYLOCS_BASE_IND_STR.TOC_LegProst --local bodyLocLegProst = "TOC_LegProst"
---Check if the following item is a prosthesis or not ---Check if the following item is a prosthesis or not
---@param item InventoryItem? ---@param item InventoryItem?
@@ -23,7 +23,7 @@ function ProsthesisHandler.CheckIfProst(item)
return false return false
end end
return item:getBodyLocation():contains(bodyLocArmProst) return item:getBodyLocation():contains(bodylocArmProstBaseline)
end end
---Get the grouping for the prosthesis ---Get the grouping for the prosthesis
@@ -33,13 +33,10 @@ function ProsthesisHandler.GetGroup(item)
local fullType = item:getFullType() local fullType = item:getFullType()
local side = CommonMethods.GetSide(fullType) local side = CommonMethods.GetSide(fullType)
local bodyLocation = item:getBodyLocation() local bodyLocation = item:getBodyLocation()
local position local position
if bodyLocation == bodyLocArmProst then if bodyLocation:contains(bodylocArmProstBaseline) then
position = "Top_" position = "Top_"
elseif bodyLocation == bodyLocLegProst then
position = "Bottom_"
else else
TOC_DEBUG.print("Something is wrong, no position in this item") TOC_DEBUG.print("Something is wrong, no position in this item")
position = nil position = nil
@@ -86,7 +83,7 @@ function ProsthesisHandler.SearchAndSetupProsthesis(item, isEquipping)
dcInst:apply() dcInst:apply()
-- Calculates hands feasibility once again -- Calculates hands feasibility once again
CachedDataHandler.CalculateBothHandsFeasibility() CachedDataHandler.OverrideBothHandsFeasibility()
return true return true
end end
@@ -167,15 +164,15 @@ function ISUnequipAction:perform()
]] ]]
local isProst = ProsthesisHandler.SearchAndSetupProsthesis(self.item, false) local isProst = ProsthesisHandler.SearchAndSetupProsthesis(self.item, false)
local group -- local group
if isProst then -- if isProst then
group = BodyLocations.getGroup("Human") -- group = BodyLocations.getGroup("Human")
group:setMultiItem("TOC_ArmProst", false) -- group:setMultiItem("TOC_ArmProst", false)
end -- end
og_ISUnequipAction_perform(self) og_ISUnequipAction_perform(self)
if isProst then if isProst then
group:setMultiItem("TOC_ArmProst", true) -- group:setMultiItem("TOC_ArmProst", true)
-- we need to fetch the limbname associated to the prosthesis -- we need to fetch the limbname associated to the prosthesis
local side = CommonMethods.GetSide(self.item:getFullType()) local side = CommonMethods.GetSide(self.item:getFullType())

View File

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

View File

@@ -143,26 +143,6 @@ function ISHealthPanel:render()
end end
-- local og_ISHealthPanel_update = ISHealthPanel.update
-- function ISHealthPanel:update()
-- og_ISHealthPanel_update(self)
-- -- TODO Listen for changes on other player side instead of looping this
-- -- FIX Re-enable it, just for test
-- if self.character then
-- local locPlUsername = getPlayer():getUsername()
-- local remPlUsername = self.character:getUsername()
-- if locPlUsername ~= remPlUsername and self:isReallyVisible() then
-- -- Request update for TOC DATA
-- local key = CommandsData.GetKey(remPlUsername)
-- --ModData.request(key)
-- end
-- end
-- end
-- We need to override this to force the alpha to 1 -- We need to override this to force the alpha to 1
local og_ISCharacterInfoWindow_render = ISCharacterInfoWindow.prerender local og_ISCharacterInfoWindow_render = ISCharacterInfoWindow.prerender
function ISCharacterInfoWindow:prerender() function ISCharacterInfoWindow:prerender()

View File

@@ -33,7 +33,8 @@ function BaseHandler:checkItems()
local containers = ISInventoryPaneContextMenu.getContainers(self:getDoctor()) local containers = ISInventoryPaneContextMenu.getContainers(self:getDoctor())
local done = {} local done = {}
local childContainers = {} local childContainers = {}
for i=1,containers:size() do if containers ~= nil then
for i=1, containers:size() do
local container = containers:get(i-1) local container = containers:get(i-1)
done[container] = true done[container] = true
table.wipe(childContainers) table.wipe(childContainers)
@@ -45,6 +46,7 @@ function BaseHandler:checkItems()
end end
end end
end end
end
end end
function BaseHandler:checkContainerItems(container, childContainers) function BaseHandler:checkContainerItems(container, childContainers)
@@ -101,7 +103,7 @@ function BaseHandler:getItemOfTag(items, type)
end end
function BaseHandler:getAllItemsOfType(items, type) function BaseHandler:getAllItemsOfType(items, type)
local items = {} items = {}
for _,item in ipairs(items) do for _,item in ipairs(items) do
if item:getFullType() == type then if item:getFullType() == type then
table.insert(items, item) table.insert(items, item)

View File

@@ -1,5 +1,6 @@
require("TOC/Debug") require("TOC/Debug")
require("NPCs/BodyLocations") require("NPCs/BodyLocations")
local StaticData = require("TOC/StaticData")
local BodyLocationsAPI = {} local BodyLocationsAPI = {}
local function customGetVal(obj, int) return getClassFieldVal(obj, getClassField(obj, int)) end local function customGetVal(obj, int) return getClassFieldVal(obj, getClassField(obj, int)) end
@@ -8,6 +9,19 @@ local group = BodyLocations.getGroup("Human")
---@type ArrayList ---@type ArrayList
local list = customGetVal(group, 1) local list = customGetVal(group, 1)
---@param bodyLoc string
function BodyLocationsAPI.New(bodyLoc)
local curItem
if StaticData.COMPAT_42 then
curItem = BodyLocation.new(group, bodyLoc) -- create new item
group:getAllLocations():add(curItem) -- add to the list
else
curItem = group:getOrCreateLocation(bodyLoc) -- get current item - or create
end
return curItem
end
-- TODO Not sure if this method actually works as intende with b42, but for our use case it's fine...
---@param toRelocateOrCreate string ---@param toRelocateOrCreate string
---@param locationElement string ---@param locationElement string
---@param afterBoolean boolean ---@param afterBoolean boolean
@@ -19,7 +33,8 @@ function BodyLocationsAPI.MoveOrCreateBeforeOrAfter(toRelocateOrCreate, location
if itemToMoveTo ~= nil then if itemToMoveTo ~= nil then
-- Check type of arg 1 == string - if not, error out. -- Check type of arg 1 == string - if not, error out.
if type(toRelocateOrCreate) ~= "string" then error("Argument 1 is not of type string. Please re-check!", 2) end if type(toRelocateOrCreate) ~= "string" then error("Argument 1 is not of type string. Please re-check!", 2) end
local curItem = group:getOrCreateLocation(toRelocateOrCreate) -- get current item - or create
local curItem = BodyLocationsAPI.New(toRelocateOrCreate)
list:remove(curItem) -- remove from the list list:remove(curItem) -- remove from the list
local index = group:indexOf(locationElement) -- get current index after removal of the location to move to local index = group:indexOf(locationElement) -- get current index after removal of the location to move to
if afterBoolean then index = index + 1 end -- if we want it after it, we increase the index to move to by one if afterBoolean then index = index + 1 end -- if we want it after it, we increase the index to move to by one
@@ -32,27 +47,33 @@ function BodyLocationsAPI.MoveOrCreateBeforeOrAfter(toRelocateOrCreate, location
end end
end end
function TestBodyLocations()
local group = BodyLocations.getGroup("Human")
local x = group:getAllLocations()
for i=0, x:size() -1 do
---@type BodyLocation -- function TestBodyLocations()
local bl = x:get(i) -- local group = BodyLocations.getGroup("Human")
-- local x = group:getAllLocations()
print(bl:getId()) -- for i=0, x:size() -1 do
end
end -- ---@type BodyLocation
-- local bl = x:get(i)
-- print(bl:getId())
-- end
-- end
-- MultiItem causes a ton of issues... fucking hell -- MultiItem causes a ton of issues... fucking hell
BodyLocationsAPI.MoveOrCreateBeforeOrAfter("TOC_Arm", "FullTop", true) -- local curItem = BodyLocation.new(group, "TOC_Arm_L")
group:setMultiItem("TOC_Arm", true) -- group:getAllLocations():add(curItem)
BodyLocationsAPI.MoveOrCreateBeforeOrAfter("TOC_ArmProst", "TOC_Arm", true) -- local curItem = BodyLocation.new(group, "TOC_Arm_R")
group:setMultiItem("TOC_ArmProst", true) -- group:getAllLocations():add(curItem)
BodyLocationsAPI.MoveOrCreateBeforeOrAfter("TOC_ArmAccessory", "TOC_ArmProst", true)
group:setMultiItem("TOC_ArmAccessory", true) BodyLocationsAPI.New("TOC_Arm_L")
BodyLocationsAPI.New("TOC_Arm_R")
BodyLocationsAPI.New("TOC_ArmProst_L")
BodyLocationsAPI.New("TOC_ArmProst_R")
BodyLocationsAPI.New("TOC_ArmAccessory_L")
BodyLocationsAPI.New("TOC_ArmAccessory_R")

View File

@@ -13,10 +13,12 @@ end
---Print debug ---Print debug
---@param string string ---@param string string
function TOC_DEBUG.print(string) function TOC_DEBUG.print(string)
--if isDebugEnabled() then if isDebugEnabled() then
local runningFile = TOC_DEBUG.getRunningFile() local runningFile = TOC_DEBUG.getRunningFile()
print("[TOC]" .. "[" .. runningFile .. "] " .. tostring(string)) print("[TOC]" .. "[" .. runningFile .. "] " .. tostring(string))
--end else
print(string)
end
end end
---Horrendous but I don't really care about performance for this ---Horrendous but I don't really care about performance for this

View File

@@ -2,7 +2,7 @@
---@alias limbsTable {Hand_L : partDataType, ForeArm_L : partDataType, UpperArm_L : partDataType, Hand_R : partDataType, ForeArm_R : partDataType, UpperArm_R : partDataType } ---@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 prosthesisData {isProstEquipped : boolean, prostFactor : number }
---@alias prosthesesTable {Top_L : prosthesisData, Top_R : prosthesisData } -- TODO add Bottom_L and Bottom_R ---@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, isInitializing : boolean} ---@alias tocModDataType { limbs : limbsTable, prostheses : prosthesesTable, isIgnoredPartInfected : boolean, isAnyLimbCut : boolean}
--------------------------- ---------------------------
@@ -49,11 +49,14 @@ StaticData.PARTS_STR = {
"UpperArm" "UpperArm"
} }
-- TODO make it a bit more elegant
StaticData.MOD_BODYLOCS_BASE_IND_STR = { StaticData.MOD_BODYLOCS_BASE_IND_STR = {
TOC_ArmProst = "TOC_ArmProst", TOC_ArmProst_L = "TOC_ArmProst_L",
TOC_LegProst = "TOC_LegProst", TOC_ArmProst_R = "TOC_ArmProst_R",
TOC_Arm = "TOC_Arm", TOC_Arm_L = "TOC_Arm_L",
TOC_Arm_R = "TOC_Arm_R",
--TOC_LegProst = "TOC_LegProst",
} }
-- No "MAX" here. -- No "MAX" here.
@@ -149,6 +152,7 @@ StaticData.AMP_GROUPS_BASE_IND_STR = {
Bottom = "Bottom" Bottom = "Bottom"
} }
-- FIX This should be aligned with the body locs, no reason anymore to keep it separated
StaticData.AMP_GROUPS_IND_STR = {} StaticData.AMP_GROUPS_IND_STR = {}
StaticData.AMP_GROUPS_STR = {} StaticData.AMP_GROUPS_STR = {}

View File

@@ -9,9 +9,10 @@ module TOC
{ {
Type = Clothing, Type = Clothing,
DisplayCategory = Amputation, DisplayCategory = Amputation,
hidden = true,
ClothingItem = Amputation_Hand_R, ClothingItem = Amputation_Hand_R,
BodyLocation = TOC_Arm, BodyLocation = TOC_Arm_R,
Weight = 0, Weight = 0,
CombatSpeedModifier = 0.9, CombatSpeedModifier = 0.9,
@@ -27,9 +28,10 @@ module TOC
{ {
Type = Clothing, Type = Clothing,
DisplayCategory = Amputation, DisplayCategory = Amputation,
hidden = true,
ClothingItem = Amputation_ForeArm_R, ClothingItem = Amputation_ForeArm_R,
BodyLocation = TOC_Arm, BodyLocation = TOC_Arm_R,
Weight = 0, Weight = 0,
CombatSpeedModifier = 0.8, CombatSpeedModifier = 0.8,
@@ -44,9 +46,10 @@ module TOC
{ {
Type = Clothing, Type = Clothing,
DisplayCategory = Amputation, DisplayCategory = Amputation,
hidden = true,
ClothingItem = Amputation_UpperArm_R, ClothingItem = Amputation_UpperArm_R,
BodyLocation = TOC_Arm, BodyLocation = TOC_Arm_R,
BloodLocation = UpperArms;UpperBody, BloodLocation = UpperArms;UpperBody,
Weight = 0, Weight = 0,
CombatSpeedModifier = 0.7, CombatSpeedModifier = 0.7,
@@ -60,9 +63,10 @@ module TOC
{ {
Type = Clothing, Type = Clothing,
DisplayCategory = Amputation, DisplayCategory = Amputation,
hidden = true,
ClothingItem = Amputation_Hand_L, ClothingItem = Amputation_Hand_L,
BodyLocation = TOC_Arm, BodyLocation = TOC_Arm_L,
Weight = 0, Weight = 0,
CombatSpeedModifier = 0.9, CombatSpeedModifier = 0.9,
@@ -78,9 +82,10 @@ module TOC
{ {
Type = Clothing, Type = Clothing,
DisplayCategory = Amputation, DisplayCategory = Amputation,
hidden = true,
ClothingItem = Amputation_ForeArm_L, ClothingItem = Amputation_ForeArm_L,
BodyLocation = TOC_Arm, BodyLocation = TOC_Arm_L,
Weight = 0, Weight = 0,
CombatSpeedModifier = 0.8, CombatSpeedModifier = 0.8,
@@ -96,9 +101,10 @@ module TOC
{ {
Type = Clothing, Type = Clothing,
DisplayCategory = Amputation, DisplayCategory = Amputation,
hidden = true,
ClothingItem = Amputation_UpperArm_L, ClothingItem = Amputation_UpperArm_L,
BodyLocation = TOC_Arm, BodyLocation = TOC_Arm_L,
Weight = 0, Weight = 0,
CombatSpeedModifier = 0.7, CombatSpeedModifier = 0.7,

View File

@@ -16,7 +16,7 @@ module TOC
ClothingItemExtra = Prost_HookArm_R, ClothingItemExtra = Prost_HookArm_R,
ClothingItemExtraOption = InstallProstRight, ClothingItemExtraOption = InstallProstRight,
clothingExtraSubmenu = InstallProstLeft, clothingExtraSubmenu = InstallProstLeft,
BodyLocation = TOC_ArmProst, BodyLocation = TOC_ArmProst_L,
Weight = 1.5, Weight = 1.5,
CombatSpeedModifier = 1.05, CombatSpeedModifier = 1.05,
BloodLocation = UpperArms;UpperBody, BloodLocation = UpperArms;UpperBody,
@@ -38,7 +38,7 @@ module TOC
ClothingItemExtra = Prost_HookArm_L, ClothingItemExtra = Prost_HookArm_L,
ClothingItemExtraOption = InstallProstLeft, ClothingItemExtraOption = InstallProstLeft,
clothingExtraSubmenu = InstallProstRight, clothingExtraSubmenu = InstallProstRight,
BodyLocation = TOC_ArmProst, BodyLocation = TOC_ArmProst_R,
Weight = 1.5, Weight = 1.5,
CombatSpeedModifier = 1.05, CombatSpeedModifier = 1.05,
BloodLocation = UpperArms;UpperBody, BloodLocation = UpperArms;UpperBody,
@@ -60,7 +60,7 @@ module TOC
ClothingItemExtra = Prost_NormalArm_R, ClothingItemExtra = Prost_NormalArm_R,
ClothingItemExtraOption = InstallProstRight, ClothingItemExtraOption = InstallProstRight,
clothingExtraSubmenu = InstallProstLeft, clothingExtraSubmenu = InstallProstLeft,
BodyLocation = TOC_ArmProst, BodyLocation = TOC_ArmProst_L,
Weight = 2, Weight = 2,
CombatSpeedModifier = 1.1, CombatSpeedModifier = 1.1,
BloodLocation = UpperArms;UpperBody, BloodLocation = UpperArms;UpperBody,
@@ -82,7 +82,7 @@ module TOC
ClothingItemExtra = Prost_NormalArm_L, ClothingItemExtra = Prost_NormalArm_L,
ClothingItemExtraOption = InstallProstLeft, ClothingItemExtraOption = InstallProstLeft,
clothingExtraSubmenu = InstallProstRight, clothingExtraSubmenu = InstallProstRight,
BodyLocation = TOC_ArmProst, BodyLocation = TOC_ArmProst_R,
Weight = 2, Weight = 2,
CombatSpeedModifier = 1.1, CombatSpeedModifier = 1.1,
BloodLocation = UpperArms;UpperBody, BloodLocation = UpperArms;UpperBody,

View File

@@ -15,7 +15,7 @@ module TOC
ClothingItemExtra = Surg_Arm_Tourniquet_R, ClothingItemExtra = Surg_Arm_Tourniquet_R,
ClothingItemExtraOption = PutTourniquetArmRight, ClothingItemExtraOption = PutTourniquetArmRight,
clothingExtraSubmenu = PutTourniquetArmLeft, clothingExtraSubmenu = PutTourniquetArmLeft,
BodyLocation = TOC_ArmAccessory, BodyLocation = TOC_ArmAccessory_L,
BloodLocation = UpperArms;UpperBody, BloodLocation = UpperArms;UpperBody,
Weight = 0.25, Weight = 0.25,
@@ -35,7 +35,7 @@ module TOC
ClothingItemExtra = Surg_Arm_Tourniquet_L, ClothingItemExtra = Surg_Arm_Tourniquet_L,
ClothingItemExtraOption = PutTourniquetArmLeft, ClothingItemExtraOption = PutTourniquetArmLeft,
clothingExtraSubmenu = PutTourniquetArmRight, clothingExtraSubmenu = PutTourniquetArmRight,
BodyLocation = TOC_ArmAccessory, BodyLocation = TOC_ArmAccessory_R,
BloodLocation = UpperArms;UpperBody, BloodLocation = UpperArms;UpperBody,
Weight = 0.25, Weight = 0.25,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
dev_stuff/female_mask.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -0,0 +1,65 @@
from pathlib import Path
from PIL import Image
import os
input_bodies_path = Path('input/body')
input_wound_texture = Path('input/wound.png')
# 45, 33 TEXTURE
# 256,256
IMG_WIDTH = 256
COORDS_L = {
"H": (2, 100),
"F": (2, 59),
"U": (2,21),
}
COORDS_R = {
"H": (IMG_WIDTH - 43- COORDS_L['H'][0], COORDS_L['H'][1]),
"F": (IMG_WIDTH - 43 - COORDS_L['F'][0], COORDS_L['F'][1]),
"U": (IMG_WIDTH - 43 - COORDS_L['U'][0], COORDS_L['U'][1]),
}
FULL_COORDS = {key: (COORDS_L[key], COORDS_R[key]) for key in COORDS_L}
print(FULL_COORDS)
overlay = Image.open(input_wound_texture)
for filepath in input_bodies_path.glob('*.png'): # Only PNG files
print(f'Processing {filepath.name}...')
base = Image.open(filepath)
body_name = filepath.stem.replace('MaleBody', 'skin')
if body_name.endswith('a'):
body_name = body_name[:-1] + '_hairy_b'
else:
body_name = body_name + '_b'
for key, (value_L, value_R) in FULL_COORDS.items():
print(key)
result = base.copy()
result.paste(overlay, value_L, mask=overlay)
result.paste(overlay, value_R, mask=overlay)
output_path = 'output/'
if key == "H":
os.makedirs('output/Hand', exist_ok=True)
output_path = 'output/Hand'
if key == "F":
os.makedirs('output/Forearm', exist_ok=True)
output_path = 'output/Forearm'
if key == "U":
os.makedirs('output/UpperArm', exist_ok=True)
output_path = 'output/UpperArm'
result.save(f'{output_path}/{body_name}.png')

View File

@@ -0,0 +1,3 @@
16:46:38:807 [CRITICAL] SharedConnection - Failed to open WinHTTP Session. The parameter is incorrect.
, last error code = 87

View File

@@ -4,26 +4,21 @@
[h1]You're bitten. You have two choices.[/h1] [h1]You're bitten. You have two choices.[/h1]
Wait until you succumb to the virus or take matters into your hands. Cut off that infected part and live to die another day. Wait until you succumb to the virus or take matters into your hands. Cut off that infected part and live to die another day.
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.
[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]
[b]The older version will be delisted shortly and it will not be supported anymore.[/b]
[h1]Supports [b]Single Player[/b] and [b]Multiplayer[/b]. Host Mode is currently [b]UNSUPPORTED![/b][/h1]
[h1]Setup[/h1] [h1]Setup[/h1]
Use it with the following mods for the intended experience: [strike]Use it with the following mods for the intended experience:
[list] [list]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2904920097]Fancy Handwork[/url] [*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2904920097]Fancy Handwork[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2934621024]Brutal Handwork[/url] [*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2934621024]Brutal Handwork[/url]
[/list] [/list]
Place them [b]BEFORE[/b] The Only Cure in your mod list! Place them [b]BEFORE[/b] The Only Cure in your mod list![/strike]
[b]At the moment, the mods listed here aren't compatible with B42.[/b]
[hr][/hr] [hr][/hr]
[h1]Quick guide[/h1] [h1]Quick guide[/h1]
[h2]Amputation[/h2] [h2]Amputation[/h2]
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. Get a [i]Saw[/i]/[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.
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. 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.
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. 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.
@@ -77,8 +72,8 @@ Got any issues or found some pesky bugs? Report them on GitHub!
[th]Compatibility API[/th] [th]Compatibility API[/th]
[/tr] [/tr]
[tr] [tr]
[th]JCloudJalix[/th] [th]JCloudJalix, Rinary1, pllq, ttaeo, pgmbru[/th]
[th]German translation[/th] [th]Translation[/th]
[/tr] [/tr]
[/table] [/table]

View File

@@ -4,4 +4,4 @@ description=You've been bitten. You have only two choices.
id=TheOnlyCure id=TheOnlyCure
icon=icon.png icon=icon.png
url=https://github.com/ZioPao/The-Only-Cure url=https://github.com/ZioPao/The-Only-Cure
modversion=2.1.7 modversion=2.2.1

7
mod_41.info Normal file
View File

@@ -0,0 +1,7 @@
name=The Only Cure
poster=poster.png
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.2.1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

After

Width:  |  Height:  |  Size: 210 KiB

BIN
poster_b41.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

View File

@@ -1,6 +1,6 @@
version=1 version=1
id=3236152598 id=3580276809
title=The Only Cure - Rebuilt title=[B42] The Only Cure
description=[img]https://raw.githubusercontent.com/ZioPao/The-Only-Cure/551125bb50cb65608ad89ca81ef0daccb3b02c4c/dev_stuff/logos/title.png[/img] description=[img]https://raw.githubusercontent.com/ZioPao/The-Only-Cure/551125bb50cb65608ad89ca81ef0daccb3b02c4c/dev_stuff/logos/title.png[/img]
description= description=
@@ -27,7 +27,7 @@ description=
description=[h1]Setup[/h1] description=[h1]Setup[/h1]
description=Use it with the following mods for the intended experience: description=[strike]Use it with the following mods for the intended experience:
description=[list] description=[list]
@@ -39,10 +39,12 @@ description=[/list]
description= description=
description=Place them [b]BEFORE[/b] The Only Cure in your mod list! description=Place them [b]BEFORE[/b] The Only Cure in your mod list![/strike]
description= description=
description=[b]At the moment, the mods listed here aren't compatible with B42.
description=[hr][/hr] description=[hr][/hr]
description= description=
@@ -181,5 +183,5 @@ description=
description=[hr][/hr] description=[hr][/hr]
tags=Build 41;Balance;Interface;Items;Misc;Multiplayer;Realistic;Textures tags=Build 42;Balance;Interface;Items;Misc;Multiplayer;Realistic;Textures
visibility=public visibility=public