From fa6e89cdc76c43fd6f540c76649cc4a8e2f09832 Mon Sep 17 00:00:00 2001 From: Pao Date: Mon, 13 Feb 2023 17:20:16 +0100 Subject: [PATCH] More setup stuff for prosthesis --- .../ActionsMethods/TOC_ProsthesisMethods.lua | 36 +--- media/lua/client/TOC_OverridenFunctions.lua | 2 + media/lua/client/TOC_ProsthesisHandler.lua | 204 +++++++++++++----- media/lua/client/TOC_Update.lua | 14 +- media/ui/TOC/Left_Foot/Base.png | Bin 1859 -> 2966 bytes models_stuff/foot_icon.psd | Bin 0 -> 22190 bytes python_helpers/main.py | 27 +-- 7 files changed, 173 insertions(+), 110 deletions(-) create mode 100644 models_stuff/foot_icon.psd diff --git a/media/lua/client/ActionsMethods/TOC_ProsthesisMethods.lua b/media/lua/client/ActionsMethods/TOC_ProsthesisMethods.lua index da3ee96..36f24b7 100644 --- a/media/lua/client/ActionsMethods/TOC_ProsthesisMethods.lua +++ b/media/lua/client/ActionsMethods/TOC_ProsthesisMethods.lua @@ -14,33 +14,9 @@ function TocEquipProsthesis(part_name, prosthesis_item, prosthesis_base_name) -- TODO We need to pass the original item so we can get its data! local player = getPlayer() - local toc_data = player:getModData().TOC - - - local item_mod_data = prosthesis_item:getModData() - - if item_mod_data.TOC == nil then - GenerateEquippedProsthesis(prosthesis_item, "Test") -- TODO Change it with the limb - item_mod_data = prosthesis_item:getModData() -- Updates it - end - - - --print("TOC: Test durability normal item " .. item_mod_data.TOC.durability) - - - local prosthesis_name = TocFindCorrectClothingProsthesis(prosthesis_base_name, part_name) - local added_prosthesis = player:getInventory():AddItem(prosthesis_name) - - - -- Add parameters to added_prosthesis - local added_prosthesis_mod_data = added_prosthesis:getModData() - - added_prosthesis_mod_data.TOC = { - durability = item_mod_data.TOC.durability, - speed = item_mod_data.TOC.speed, - } + local equipped_prosthesis = GenerateEquippedProsthesis(prosthesis_item, player:getInventory(), "Hand") --print("TOC: Test durability new item " .. added_prosthesis_mod_data.TOC.durability) @@ -49,16 +25,16 @@ function TocEquipProsthesis(part_name, prosthesis_item, prosthesis_base_name) if part_name ~= nil then - if added_prosthesis ~= nil then + if equipped_prosthesis ~= nil then toc_data.Limbs[part_name].is_prosthesis_equipped = true - toc_data.Limbs[part_name].equipped_prosthesis = toc_data.Prosthesis[prosthesis_base_name][part_name] + toc_data.Limbs[part_name].equipped_prosthesis = toc_data.Prosthesis[prosthesis_base_name][part_name] -- TODO Change this, it's old if player:isFemale() then - added_prosthesis:getVisual():setTextureChoice(1) + equipped_prosthesis:getVisual():setTextureChoice(1) else - added_prosthesis:getVisual():setTextureChoice(0) + equipped_prosthesis:getVisual():setTextureChoice(0) end - player:setWornItem(added_prosthesis:getBodyLocation(), added_prosthesis) + player:setWornItem(equipped_prosthesis:getBodyLocation(), equipped_prosthesis) diff --git a/media/lua/client/TOC_OverridenFunctions.lua b/media/lua/client/TOC_OverridenFunctions.lua index fd8fe8d..fa179fe 100644 --- a/media/lua/client/TOC_OverridenFunctions.lua +++ b/media/lua/client/TOC_OverridenFunctions.lua @@ -7,6 +7,8 @@ require "ISUI/ISInventoryPaneContextMenu" local og_ISBaseTimedActionAdjustMaxTime = ISBaseTimedAction.adjustMaxTime function ISBaseTimedAction:adjustMaxTime(maxTime) + -- TODO we can customize it better through clothing items modifier, you mook + -- RunSpeedModifier = 0.93 for example local original_max_time = og_ISBaseTimedActionAdjustMaxTime(self, maxTime) if original_max_time ~= -1 then diff --git a/media/lua/client/TOC_ProsthesisHandler.lua b/media/lua/client/TOC_ProsthesisHandler.lua index d5dc025..ef2e1de 100644 --- a/media/lua/client/TOC_ProsthesisHandler.lua +++ b/media/lua/client/TOC_ProsthesisHandler.lua @@ -1,4 +1,5 @@ -local BaseStats = { +-- Use the XLSX as a base for these stats +local base_table = { LeatherBase = { durability = 25, speed = 15 @@ -18,72 +19,173 @@ local BaseStats = { } -local TopStats = { +local top_table = { + MetalHook = { + durability = 1, + speed = 1, + }, + WoodenHook = { + durability = 1, + speed = 1, + } } - - - - -function GenerateEquippedProsthesis(prosthesis_item, limb) - -- TODO Durability should be decided from the clothing item xml. Same thing for disassembling stuff - - -- TODO some stuff should be defined by the limb, like -10 if forearm in speed --- -- when we equip a prosthesis, we're gonna pass these parameters to the newly generated clothing item --- -- when we unequip it, we regen the normal item with the parameters from the clothing item - - local durability = 0 - local speed = 0 - - local prosthesis_name = prosthesis_item:getFullType() - - for base_name, base_values in pairs(BaseStats) do +local function GetProsthesisStats(array_stats, prosthesis_name) + local durability + local speed + for name, values in pairs(array_stats) do -- Check the name of the prosthesis item, set the correct values - if string.find(prosthesis_name, base_name) then - durability = base_values.durability - speed = base_values.speed + if string.find(prosthesis_name, name) then + durability = values.durability + speed = values.speed + + return durability, speed end end - - - for top_name, top_values in pairs(TopStats) do - -- Check the name of the prosthesis item, set the correct values - if string.find(prosthesis_name, top_name) then - durability = durability + top_values.durability - speed = speed + top_values.speed - end - end - - local item_mod_data = prosthesis_item:getModData() - - -------------------- - -- TEST STUFF - durability = 12 - speed = 51 - - ------------------- - - - item_mod_data.TOC = { - durability = durability, - speed = speed, - } end ---local ProsthesisRecipe = {} +---comment +---@param prosthesis_item any Normal item +---@param inventory any player inventory +---@param limb any +---@return unknown equipped_prosthesis clothing item equipped prosthesis +function GenerateEquippedProsthesis(prosthesis_item, inventory, limb) + -- TODO Durability should be decided from the clothing item xml. Same thing for disassembling stuff + -- TODO some stuff should be defined by the limb, like -10 if forearm in speed + -- when we equip a prosthesis, we're gonna pass these parameters to the newly generated clothing item + -- when we unequip it, we regen the normal item with the parameters from the clothing item --- function ProsthesisRecipe.OnCreate.Hook(items, result, player, selectedItem) - --- -- Set mod data for item with durability and all that crap + local prosthesis_name = prosthesis_item:getFullType() + local item_mod_data = prosthesis_item:getModData() --- end + local durability_base = 0 + local speed_base = 0 + + local durability_top = 0 + local speed_top = 0 + + + -- Check the item mod data if the values are different than the default values + + if item_mod_data.TOC ~= nil then + durability_base = item_mod_data.base_durability + durability_top = item_mod_data.top_durability + -- else + -- durability_base, speed_base = GetProsthesisStats(base_table, prosthesis_name) + -- durability_top, speed_top = GetProsthesisStats(top_table, prosthesis_name) + end + + local equipped_prosthesis = inventory:AddItem(prosthesis_name) + equipped_prosthesis:setCondition(prosthesis_item:getCondition()) + + equipped_prosthesis:getModData().TOC = { + base_durability = durability_base, + top_durability = durability_top, + } + + return equipped_prosthesis + +end + + +---------------------------------------------------------- +-- Recipe functions + +ProsthesisRecipes = {} + + +local function GetProshetsisPartName(array_stats, prosthesis_name) + for name, _ in pairs(array_stats) do + if string.find(prosthesis_name, name) then + return name + end + end + +end + +-- Creates the Normal Prosthesis Item +function ProsthesisRecipes.OnCreateProsthesis(items, result, player, selectedItem) + -- TODO We need a screwdriver to craft it? Some screws maybe + + + -- Set mod data for item with durability and all that crap + + -- Get condition from the items + local condition = 0 + for i=1,items:size() do + local item = items:get(i-1) + condition = condition + item:getCondition() + end + + result:setCondition(condition) -- Should be the sum? + + result:getModData().TOC = { + base_durability = 100, + top_durability = 100, -- Stores it here too so we can re-reference it for later + } + +end + + +-- Reassign the correct condition to each item +function ProsthesisRecipes.OnDisassembleProsthesis(item, result_items, player, selectedItem) + + -- Check durability of original item + local item_mod_data = item.getModData().TOC + + local durability_top = item_mod_data.top.durability + local durability_base = item_mod_data.base.durability + + -- TODO do we actually need to store speed again? + local speed_top = item_mod_data.top.speed + local speed_base = item_mod_data.base.speed + + + -- Check name of the item + local prosthesis_item_name = item:getFullType() + + local base_name = GetProshetsisPartName(base_table, prosthesis_item_name) + local top_name = GetProshetsisPartName(top_table, prosthesis_item_name) + + print("TOC: " .. base_name .. " and " .. top_name) + + local player_inv = player:getInventory() + + local part_base = player_inv:AddItem("TOC.ProstPart" .. base_name) + part_base:setCondition(durability_base) + local part_top = player_inv:AddItem("TOC.ProstPart" .. top_name) + part_top:setCondition(durability_top) + + + + +end + + + +function ProsthesisRecipes.OnCreateProsthesisPartItem(items, result, player, selectedItem) + -- TODO Assign condition here from the table + + +end + + + + + + +-- Parts should have a default condition max set at creation +-- When we create a prosthesis, we carry the condition from the parts +-- If we disassemble the prosthesis, the condition will be carried back to the parts + +-- Speed stat should be managed in another way, so change it \ No newline at end of file diff --git a/media/lua/client/TOC_Update.lua b/media/lua/client/TOC_Update.lua index 254faf8..977af39 100644 --- a/media/lua/client/TOC_Update.lua +++ b/media/lua/client/TOC_Update.lua @@ -170,8 +170,6 @@ local function UpdatePlayerHealth(player, part_data) end -- MAIN UPDATE FUNCTIONS - - local function TocUpdateOnTick() local player = getPlayer() @@ -187,6 +185,7 @@ local function TocUpdateOnTick() end + local function TocUpdateEveryTenMinutes() local player = getPlayer() @@ -229,6 +228,7 @@ local function TocUpdateEveryTenMinutes() end end + local function TocUpdateEveryOneMinute() local player = getPlayer() @@ -258,6 +258,14 @@ end +local function TocOnDamage(player, type, amount) + + + +end + + + Events.OnTick.Add(TocUpdateOnTick) Events.EveryTenMinutes.Add(TocUpdateEveryTenMinutes) -Events.EveryOneMinute.Add(TocUpdateEveryOneMinute) +Events.EveryOneMinute.Add(TocUpdateEveryOneMinute) \ No newline at end of file diff --git a/media/ui/TOC/Left_Foot/Base.png b/media/ui/TOC/Left_Foot/Base.png index 373ca1760639c20ae380b155a96ce9029f98ed56..b84ee5aee48448c038710db3141c208ad54d3b0d 100644 GIT binary patch literal 2966 zcmV;H3u*L;P)StO&>uS)ve<0AYj>5AR{$W90N^4L=L-RlQUJ&DC0@ZjPh;=*jPLSYvv5M~MFBAl0-BNIsH z15C~g000{K(ZT*WKal6<?_01!^k@7iDG<<3=fuAC~28EsPoqkpK{9G%|Vj005J}`Hw&=0RYXHq~ibpyyzHQsFW8>#s~laM4*8xut5h5 z!4#~(4xGUqyucR%VFpA%3?#rj5JCpzfE)^;7?wd9RKPme1hudO8lVxH;SjXJF*pt9 z;1XPc>u?taU>Kgl7`%oF1VP9M6Ja4bh!J9r*dopd7nzO(B4J20l7OTj>4+3jBE`sZ zqynizYLQ(?Bl0bB6giDtK>Co|$RIL`{EECsF_eL_Q3KQhbwIhO9~z3rpmWi5G!I>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e=DMiLa>`1>6DL5K0Rj+kj6y;I&d19{zy^nS39wc_qc9YLDCIUdOBDzeI;TU~ zg2X@;J&sTqhCvpq-rzB(lNReM5RTzEikVS^5iwW@lbJA>pzs3&aT4t%^6jsMg@K(7 zE>jedKvBQnulF1Ef>eqctX3MFv z|3V!(en0^5t4PdmxKW=DrOae`TJX!M_g!G@q{7%>5H%x$;Rt4S;W%M55x6xCGY}Xy z0Cfs9>kU2(Y64Kh15l7NG^vn}1k)7Z6(o)X2D2Pl%Ag`&3PTY$64`=Jkbq#IoiU_^ z(@8jZSs{6faoBAzuvyQtG{Ja1l+}oN5j+DoARdd!gk(?|83=8{J*3f!V-~Y{@V;H3 zD%8jh-lzZP{XB^UrA7K4n@24;H6@4~RtCWehAX0gc{jZBu}~-r2$E8>+Xho=SQ#1) ze`X)s0|T`FG6srXhm@uY4 zH?8_P(}rO&e=J=&|E&{l&6@gSlZsDvuIV^`Jo>`L;DnUeocLYbY3xwnKJ8+6B9G;F ztXOs@<(J^x+BZibo5x;jTd^$tnYe{L{a?;RdY31;hMY2R>uUE5FPf@bOT{*619z?a z^<#HN-_R(1V@|%^xUPL=Vs8>!RnnIH*&ETfxAk9d*e$M_xL|1A2j^mrw&--lC)|}} zK__?kr~2(14r*(@@SXn}8HP5-xLT|CxVOwmYEGE)-Ri1KHv(Hr=2>^|?KyknTx09F zo&C3tCGS3(cjdQp?orpO3|sQ{m1pkx_)gsSsfUVdTf5gEf9fBTo zK3Nj%n7ShNqq?OdS0%$uF7tROaP{ovO9$LjUg+%nd0Wfq#*(?;G|cJQG-6}s<S6~*VZ0~&#ygJ wy-&LyiNF11zwTbsnYwjX-yg$_)7~Dkx$EYPsI6kM`kQl1&b7C^`p*2n0f7yklmGw# diff --git a/models_stuff/foot_icon.psd b/models_stuff/foot_icon.psd new file mode 100644 index 0000000000000000000000000000000000000000..1a7c7e2e64245f8d794d21cbc52a460d6e1e5999 GIT binary patch literal 22190 zcmeGkX>1%<`OU7qzSd5hgO(P`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YZ({7}g_HtCRPN(q(Xi(tmV*yGt zO|=-1OATmfp8&GB^23uXa7l1!*5}7EB#SvX9jY_@>C%w{0L#%?^=}uya74!)FUj-DGqN2J%hG=3PJ>y-*t|a z1Uo>i7u!odOkb@IMjp2ck^+H`P?5Fk1mC~s>tFoetOZ2i8_dPdh%;t^wTjcQMEo|N zA%CahZ6t* literal 0 HcmV?d00001 diff --git a/python_helpers/main.py b/python_helpers/main.py index 1caf7fd..f1a67bb 100644 --- a/python_helpers/main.py +++ b/python_helpers/main.py @@ -69,14 +69,6 @@ def generate_clothing_item(name, model, texture_choices): with open(path_idtable, "ab") as file: tree_guid.write(file, encoding='utf-8', pretty_print=True) - - - - - - - - def generate_recipe(recipe_name, recipe_items, result_name, time, skill_required, tooltip): root_element = f"recipe {recipe_name}\n" root_element += "\t{\n" @@ -153,16 +145,13 @@ excel_path = r'python_helpers/modules_prost.xlsx' df_base = read_table(excel_path, "BaseTable") df_top = read_table(excel_path, "TopTable") - -# CLOTHING GENERATION PASS - limbs = ["Hand", "LowerArm"] sides = ["Left", "Right"] prost_bodylocations = ["TOC_ArmRightProsthesis", "TOC_ArmLeftProsthesis"] texture_types = ["Wooden", "Metal"] - +# CLOTHING GENERATION PASS for base_row in df_base.iterrows(): for top_row in df_top.iterrows(): base_name = base_row[1][0] @@ -174,11 +163,6 @@ for base_row in df_base.iterrows(): texture_choices = {r"Amputations\\Upperarm\\skin01_b"} generate_clothing_item(current_name, "test", texture_choices) - - - - - # ITEM GENERATION PASS - ASSEMBLED for base_row in df_base.iterrows(): for top_row in df_top.iterrows(): @@ -199,7 +183,6 @@ for base_row in df_base.iterrows(): icon = "metalLeg" generate_item(item_id, weight, item_type, display_category, display_name, icon, "TempTooltip", "false", clothing_item_name, bl, "Hands") - # ITEM GENERATION PASS - Single item to assemble stuff def generate_normal_items(df, type): for row in df.iterrows(): @@ -234,11 +217,3 @@ for base_row in df_base.iterrows(): skill_required = ["FirstAid","2"] # TODO Change this tooltip = "Tooltip_test" generate_recipe(recipe_name, recipe_items, result, time, skill_required, tooltip) - - - - -# GENERATE NEW GUID TABLE - - -