Fixed traits icons

This commit is contained in:
Pao
2023-02-01 21:15:20 +01:00
parent b3ce0ab2c4
commit 15c7333cf5
8 changed files with 39 additions and 51 deletions

View File

@@ -1,3 +1,7 @@
0.9.12
- Fixed traits icons
- Some cleaning to the code
0.9.11
- Hotfix to cicatrization visuals

View File

@@ -1,3 +1,26 @@
-- Init
function TocCutLimbForTrait(player, limbs_data, part_name)
local amputation_clothing_item = player:getInventory():AddItem("TOC.Amputation_" .. part_name)
TocSetCorrectTextureForAmputation(amputation_clothing_item, player, true)
player:setWornItem(amputation_clothing_item:getBodyLocation(), amputation_clothing_item)
limbs_data[part_name].is_cut = true
limbs_data[part_name].is_operated = true
limbs_data[part_name].is_amputation_shown = true
limbs_data[part_name].is_cicatrized = true
for _, v in pairs(limbs_data[part_name].depends_on) do
limbs_data[v].is_cut = true
limbs_data[v].is_operated = true
limbs_data[v].is_amputation_shown = false
limbs_data[v].is_cicatrized = true
end
end
-- CutLimb
function TocCheckIfStillInfected(limbs_data)
if limbs_data == nil then
@@ -177,7 +200,7 @@ function TocFindItemInProstBodyLocation(part_name, patient)
end
-- Debug cheat
-- Debug cheat and update every minute for cicatrization
function TocFindAmputationOrProsthesisName(part_name, player, choice)
local worn_items = player:getWornItems()
for i = 1, worn_items:size() - 1 do

View File

@@ -130,52 +130,13 @@ function TocSetInitData(mod_data, player)
-- Setup traits
if player:HasTrait("Amputee_Hand") then
local amputation_clothing_item = player:getInventory():AddItem("TOC.Amputation_Left_Hand")
TocSetCorrectTextureForAmputation(amputation_clothing_item, player, true)
player:setWornItem(amputation_clothing_item:getBodyLocation(), amputation_clothing_item)
mod_data.TOC.Limbs.Left_Hand.is_cut = true
mod_data.TOC.Limbs.Left_Hand.is_operated = true
mod_data.TOC.Limbs.Left_Hand.is_amputation_shown = true
mod_data.TOC.Limbs.Left_Hand.is_cicatrized = true
TocCutLimbForTrait(player, mod_data.TOC.Limbs, "Left_Hand")
elseif player:HasTrait("Amputee_LowerArm") then
local amputation_clothing_item = player:getInventory():AddItem("TOC.Amputation_Left_LowerArm")
TocSetCorrectTextureForAmputation(amputation_clothing_item, player, true)
player:setWornItem(amputation_clothing_item:getBodyLocation(), amputation_clothing_item)
mod_data.TOC.Limbs.Left_LowerArm.is_cut = true
mod_data.TOC.Limbs.Left_LowerArm.is_operated = true
mod_data.TOC.Limbs.Left_LowerArm.is_amputation_shown = true
mod_data.TOC.Limbs.Left_LowerArm.is_cicatrized = true
for _, v in pairs(mod_data.TOC.Limbs.Left_LowerArm.depends_on) do
mod_data.TOC.Limbs[v].is_cut = true
mod_data.TOC.Limbs[v].is_operated = true
mod_data.TOC.Limbs[v].is_amputation_shown = false
mod_data.TOC.Limbs[v].is_cicatrized = true
end
TocCutLimbForTrait(player, mod_data.TOC.Limbs, "Left_LowerArm")
elseif player:HasTrait("Amputee_UpperArm") then
local amputation_clothing_item = player:getInventory():AddItem("TOC.Amputation_Left_UpperArm")
TocSetCorrectTextureForAmputation(amputation_clothing_item, player, true)
player:setWornItem(amputation_clothing_item:getBodyLocation(), amputation_clothing_item)
mod_data.TOC.Limbs.Left_UpperArm.is_cut = true
mod_data.TOC.Limbs.Left_UpperArm.is_operated = true
mod_data.TOC.Limbs.Left_UpperArm.is_amputation_shown = true
mod_data.TOC.Limbs.Left_UpperArm.is_cicatrized = true
for _, v in pairs(mod_data.TOC.Limbs.Left_UpperArm.depends_on) do
mod_data.TOC.Limbs[v].is_cut = true
mod_data.TOC.Limbs[v].is_operated = true
mod_data.TOC.Limbs[v].is_amputation_shown = false
mod_data.TOC.Limbs[v].is_cicatrized = true
end
TocCutLimbForTrait(player, mod_data.TOC.Limbs, "Left_UpperArm")
end
end
function TocUpdateBaseData(mod_data)

View File

@@ -6,14 +6,14 @@ UI_EN = {
UI_ContextMenu_CutArm = "Cut arm",
UI_prof_surgeon = "Surgeon",
UI_profdesc_surgeon = "You are a surgeon! Start with all recipe of the mod the only cure.<br>You are also better to cut and operate.",
UI_profdesc_surgeon = "You are a surgeon! Start with all recipe of the mod the only cure.<br>Easier to amputate and operate amputees.",
UI_trait_Amputee_Hand = "Amputee hand",
UI_trait_Amputee_Hand_desc = "Begin the game without a hand but also a metal hook.",
UI_trait_Amputee_LowerArm = "Amputee forearm",
UI_trait_Amputee_LowerArm_desc = "Begin the game without a forearm but also a metal hook.",
UI_trait_Amputee_UpperArm = "Amputee arm",
UI_trait_Amputee_UpperArm_desc = "Begin the game without an arm, good luck.",
UI_trait_Amputee_Hand = "Left Hand Amputated",
UI_trait_Amputee_Hand_desc = "You lost your left hand way before the apocalypse began.",
UI_trait_Amputee_LowerArm = "Left Forearm Amputated",
UI_trait_Amputee_LowerArm_desc = "You lost your left forearm way before the apocalypse began.",
UI_trait_Amputee_UpperArm = "Entire left Arm Amputated",
UI_trait_Amputee_UpperArm_desc = "You lost your entire left arm before the apocalypse, good luck.",
UI_trait_Insensitive = "Insensitive to pain",
UI_trait_Insensitivedesc = "Reduces maximum pain.",

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -5,5 +5,5 @@ description=Bitten? Not a problem!
id=Amputation2
icon=icon.png
url=https://github.com/ZioPao/The-Only-Cure-But-Better
modversion=0.9.11
modversion=0.9.12
pzversion=41.65