some cleaning and a fix

This commit is contained in:
Pao
2023-01-30 18:51:23 +01:00
parent 3afedacbb3
commit 87ea5abe05
22 changed files with 71 additions and 59 deletions

View File

@@ -6,5 +6,5 @@
<m_Static>false</m_Static> <m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint> <m_AllowRandomTint>false</m_AllowRandomTint>
<textureChoices>Clothes\metal</textureChoices> <textureChoices>Prosthesis\metal_base</textureChoices>
</clothingItem> </clothingItem>

View File

@@ -6,5 +6,5 @@
<m_Static>false</m_Static> <m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint> <m_AllowRandomTint>false</m_AllowRandomTint>
<textureChoices>Clothes\metal</textureChoices> <textureChoices>Prosthesis\metal_base</textureChoices>
</clothingItem> </clothingItem>

View File

@@ -6,5 +6,5 @@
<m_Static>false</m_Static> <m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint> <m_AllowRandomTint>false</m_AllowRandomTint>
<textureChoices>Clothes\wood</textureChoices> <textureChoices>Prosthesis\wood_base</textureChoices>
</clothingItem> </clothingItem>

View File

@@ -6,5 +6,5 @@
<m_Static>false</m_Static> <m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint> <m_AllowRandomTint>false</m_AllowRandomTint>
<textureChoices>Clothes\metal</textureChoices> <textureChoices>Prosthesis\metal_base</textureChoices>
</clothingItem> </clothingItem>

View File

@@ -7,6 +7,6 @@
<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>
<textureChoices>Clothes\metal_male</textureChoices> <textureChoices>Prosthesis\metal_hook_male</textureChoices>
<textureChoices>Clothes\metal_female</textureChoices> <textureChoices>Prosthesis\metal_hook_female</textureChoices>
</clothingItem> </clothingItem>

View File

@@ -6,6 +6,6 @@
<m_Static>false</m_Static> <m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint> <m_AllowRandomTint>false</m_AllowRandomTint>
<textureChoices>Clothes\wood_male</textureChoices> <textureChoices>Prosthesis\wood_hook_male</textureChoices>
<textureChoices>Clothes\wood_female</textureChoices> <textureChoices>Prosthesis\wood_hook_female</textureChoices>
</clothingItem> </clothingItem>

View File

@@ -6,5 +6,5 @@
<m_Static>false</m_Static> <m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint> <m_AllowRandomTint>false</m_AllowRandomTint>
<textureChoices>Clothes\metal</textureChoices> <textureChoices>Prosthesis\metal_base</textureChoices>
</clothingItem> </clothingItem>

View File

@@ -6,5 +6,5 @@
<m_Static>false</m_Static> <m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint> <m_AllowRandomTint>false</m_AllowRandomTint>
<textureChoices>Clothes\metal</textureChoices> <textureChoices>Prosthesis\metal_base</textureChoices>
</clothingItem> </clothingItem>

View File

@@ -6,5 +6,5 @@
<m_Static>false</m_Static> <m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint> <m_AllowRandomTint>false</m_AllowRandomTint>
<textureChoices>Clothes\wood</textureChoices> <textureChoices>Prosthesis\wood_base</textureChoices>
</clothingItem> </clothingItem>

View File

@@ -6,5 +6,5 @@
<m_Static>false</m_Static> <m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint> <m_AllowRandomTint>false</m_AllowRandomTint>
<textureChoices>Clothes\metal</textureChoices> <textureChoices>Prosthesis\metal_base</textureChoices>
</clothingItem> </clothingItem>

View File

@@ -6,6 +6,6 @@
<m_Static>false</m_Static> <m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint> <m_AllowRandomTint>false</m_AllowRandomTint>
<textureChoices>Clothes\metal_male</textureChoices> <textureChoices>Prosthesis\metal_hook_male</textureChoices>
<textureChoices>Clothes\metal_female</textureChoices> <textureChoices>Prosthesis\metal_hook_female</textureChoices>
</clothingItem> </clothingItem>

View File

@@ -6,6 +6,6 @@
<m_Static>false</m_Static> <m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint> <m_AllowRandomTint>false</m_AllowRandomTint>
<textureChoices>Clothes\wood_male</textureChoices> <textureChoices>Prosthesis\wood_hook_male</textureChoices>
<textureChoices>Clothes\wood_female</textureChoices> <textureChoices>Prosthesis\wood_hook_female</textureChoices>
</clothingItem> </clothingItem>

View File

@@ -64,53 +64,65 @@ local function SetHealthStatusForBodyPart(part_data, part_name, player)
-- TODO Implement this -- TODO Implement this
if part_data[part_name].is_cut then
-- Set max health for body part -- if the player gets attacked and damaged in a cut area we have to reset it here since it doesn't make any sense
if part_data[part_name].is_cicatrized and body_part:getHealth() > 80 then -- this is using map 1:1, so it doesn't affect the wound caused by the amputation
body_part:SetHealth(80) body_part:setBleeding(false);
elseif body_part:getHealth() > 40 then body_part:setDeepWounded(false)
body_part:SetHealth(40) body_part:setBleedingTime(0)
end body_part:setDeepWoundTime(0)
body_part:SetBitten(false)
-- Cicatrization check body_part:setBiteTime(0)
if part_data[part_name].is_cut and not part_data[part_name].is_cicatrized then part_data.is_infected = false
if part_data[part_name].cicatrization_time < 0 then
part_data[part_name].is_cicatrized = true
-- TODO make this random if the player gets it or not
if (not player:HasTrait("Brave")) and ZombRand(1, 11) > 5 then
player:getTraits():add("Brave")
end
if (not player:HasTrait("Insensitive")) and ZombRand(1, 11) > 5 then
player:getTraits():add("Insensitive")
end
-- if the player gets attacked and damaged in a cut area we have to reset it here since it doesn't make any sense
body_part:setBleeding(false);
body_part:setDeepWounded(false)
body_part:setBleedingTime(0)
body_part:setDeepWoundTime(0)
body_part:SetBitten(false)
body_part:setBiteTime(0)
part_data.is_infected = false
-- Set max health for body part
if part_data[part_name].is_cicatrized and body_part:getHealth() > 80 then
body_part:SetHealth(80)
elseif body_part:getHealth() > 40 then
body_part:SetHealth(40)
end end
-- Cicatrization check
if not part_data[part_name].is_cicatrized then
if part_data[part_name].cicatrization_time < 0 then
part_data[part_name].is_cicatrized = true
-- TODO make this random if the player gets it or not
if (not player:HasTrait("Brave")) and ZombRand(1, 11) > 5 then
player:getTraits():add("Brave")
end
if (not player:HasTrait("Insensitive")) and ZombRand(1, 11) > 5 then
player:getTraits():add("Insensitive")
end
-- if the player gets attacked and damaged in a cut area we have to reset it here since it doesn't make any sense
body_part:setBleeding(false);
body_part:setDeepWounded(false)
body_part:setBleedingTime(0)
body_part:setDeepWoundTime(0)
body_part:SetBitten(false)
body_part:setBiteTime(0)
part_data.is_infected = false
end
end
-- Phantom Pain
if part_data[part_name].is_amputation_shown and ZombRand(1, 100) < 10 then
local added_pain
if part_data[part_name].is_cauterized then added_pain = 60 else added_pain = 30 end
body_part:setAdditionalPain(ZombRand(1, added_pain))
end
-- TODO Add phantom pain to depended parts
end end
-- Phantom Pain
if part_data[part_name].is_amputation_shown and ZombRand(1, 100) < 10 then
local added_pain
if part_data[part_name].is_cauterized then added_pain = 60 else added_pain = 30 end
body_part:setAdditionalPain(ZombRand(1, added_pain))
end
-- TODO Add phantom pain to depended parts
end end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 549 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 782 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB