first stuff for prosthetic knifes

This commit is contained in:
Pao
2023-01-29 18:14:46 +01:00
parent 38489a3194
commit 2a35d4ed29
10 changed files with 94 additions and 38 deletions

View File

@@ -58,6 +58,13 @@ local function SetHealthStatusForBodyPart(part_data, part_name, player)
end
-- Check for stitching
local is_stitched = false
-- TODO Implement this
-- Set max health for body part
if part_data[part_name].is_cicatrized and body_part:getHealth() > 80 then
body_part:SetHealth(80)
@@ -158,8 +165,8 @@ local function TocUpdateEveryTenMinutes()
if player == nil then
return
end
local toc_data = player:getModData().TOC
local part_data = toc_data.Limbs
local part_data = player:getModData().TOC.Limbs
--Experience for prosthesis user
for _, side in ipairs(TOC_sides) do

View File

@@ -22,6 +22,15 @@ function TocSetInitData(mod_data, player)
print("TOC: Creating mod_data.TOC")
-- TODO this is gonna become a mess really fast, i fucked up.
-- TODO Move prosthesis to something more easily accessible
-- TODO Acceptable prosthesis need to be moved to something more accessible
mod_data.TOC = {
Limbs = {
@@ -104,7 +113,7 @@ function TocSetInitData(mod_data, player)
mod_data.TOC.Limbs[part_name].is_prosthesis_equipped = false
mod_data.TOC.Limbs[part_name].equipped_prosthesis = {}
mod_data.TOC.Limbs[part_name].equipped_prosthesis = {} -- TODO i'm still not usign this, I should though
-- Even if there are some duplicates, this is just easier in the end since we're gonna get fairly easily part_name
@@ -154,12 +163,13 @@ end
function TocUpdateBaseData(mod_data)
local prosthesis_list = { "WoodenHook", "MetalHook", "MetalHand" }
-- TODO The prosthetic knife needs to be a weapon first and foremost, so other than a
-- clothing item it needs to be a weapon too (an invisible one maybe?)
--local prosthesis_list = { "WoodenHook", "MetalHook", "MetalHand", "ProstheticKnife" }
local accepted_prosthesis_hand = { "WoodenHook", "MetalHook", "MetalHand" }
local accepted_prosthesis_lowerarm = { "WoodenHook", "MetalHook", "MetalHand" }
local accepted_prosthesis_hand = { "WoodenHook", "MetalHook", "MetalHand", "ProstheticKnife" }
local accepted_prosthesis_lowerarm = { "WoodenHook", "MetalHook", "MetalHand", "ProstheticKnife" }
local accepted_prosthesis_upperarm = {} -- For future stuff
for _, side in ipairs(TOC_sides) do
@@ -176,6 +186,7 @@ function TocUpdateBaseData(mod_data)
mod_data.TOC.Prosthesis["WoodenHook"][part_name].prosthesis_factor = 1.3
mod_data.TOC.Prosthesis["MetalHook"][part_name].prosthesis_factor = 1.2
mod_data.TOC.Prosthesis["MetalHand"][part_name].prosthesis_factor = 1.1
mod_data.TOC.Prosthesis["ProstheticKnife"][part_name].prosthesis_factor = 1.5
elseif limb == "LowerArm" then
@@ -186,6 +197,8 @@ function TocUpdateBaseData(mod_data)
mod_data.TOC.Prosthesis["WoodenHook"][part_name].prosthesis_factor = 1.35
mod_data.TOC.Prosthesis["MetalHook"][part_name].prosthesis_factor = 1.25
mod_data.TOC.Prosthesis["MetalHand"][part_name].prosthesis_factor = 1.15
mod_data.TOC.Prosthesis["ProstheticKnife"][part_name].prosthesis_factor = 1.6
elseif limb == "UpperArm" then
mod_data.TOC.Limbs[part_name].cicatrization_base_time = 2000
mod_data.TOC.Limbs[part_name].depends_on = { side .. "_Hand", side .. "_LowerArm", }

View File

@@ -36,7 +36,6 @@ function ISCutLimb:start()
self:setActionAnim("SawLog")
local saw_item = TocGetSawInInventory(self.surgeon)
self.sound = self.character:getEmitter():playSound("Amputation_Sound")
-- Return whatever object we've got in the inventory