diff --git a/media/AnimSets/player/idle/Bob_NoLegsIdle.xml b/media/AnimSets/player/idle/Bob_NoLegsIdle.xml new file mode 100644 index 0000000..dcb318e --- /dev/null +++ b/media/AnimSets/player/idle/Bob_NoLegsIdle.xml @@ -0,0 +1,65 @@ + + + Bob_NoLegsIdle + Zombie_Idle_FloorOnFront + Y + 0.48 + 0.20 + + IsCrawling + BOOL + true + + IdleSpeed + IdleSpeed + + Zombie_Idle_FloorOnFront + 0.00 + 0.00 + 0.80 + + + Zombie_Idle_FloorOnFront + 0.00 + 1.00 + 0.80 + + + Zombie_Idle_FloorOnFront + 0.00 + 0.04 + 0.80 + + + 1 + 2 + 3 + + + aim_default + Zombie_Idle_FloorOnFront + 0.5 + 1.5 + + + defaultWalk + 0.3 + 0.3 + + isTurningAround + BOOL + false + + + + defaultRun + Zombie_Idle_FloorOnFront + 0.1 + 0.1 + + isTurningAround + BOOL + false + + + \ No newline at end of file diff --git a/media/AnimSets/player/movement/Bob_NoLegsMovement.xml b/media/AnimSets/player/movement/Bob_NoLegsMovement.xml new file mode 100644 index 0000000..3989830 --- /dev/null +++ b/media/AnimSets/player/movement/Bob_NoLegsMovement.xml @@ -0,0 +1,109 @@ + + + defaultWalk + Zombie_Crawl + Translation_Data + Y + 1.04 + 0.20 + + IsCrawling + BOOL + true + + + WalkInjury + WalkSpeed + + Zombie_Crawl + 0.50 + 1.00 + 0.80 + + + Zombie_Crawl + -0.50 + 1.00 + 0.80 + + + Zombie_Crawl + 1.00 + 1.00 + 0.80 + + + Zombie_Crawl + -1.00 + 1.00 + 0.80 + + + Zombie_Crawl + 0.00 + 1.00 + 0.80 + + + Zombie_Crawl + 0.00 + 0.00 + 0.80 + + + 2 + 4 + 6 + + + 5 + 2 + 6 + + + 6 + 1 + 5 + + + 6 + 3 + 1 + + + Bob_NoLegsIdle + 0.3 + 1 + + + Bob_NoLegsIdle + Zombie_Crawl + 0.3 + 0.3 + + DeltaY + GTR + -0.5 + + + isMoving + BOOL + false + + + + Bob_NoLegsIdle + 0.1 + + + + Footstep + 0.15 + walk + + + Footstep + 0.6 + walk + + \ No newline at end of file diff --git a/media/clothing/clothingItems/Amputation_Left_Foot.xml b/media/clothing/clothingItems/Amputation_Left_Foot.xml new file mode 100644 index 0000000..a91081e --- /dev/null +++ b/media/clothing/clothingItems/Amputation_Left_Foot.xml @@ -0,0 +1,12 @@ + + + Amputation_Left_Hand_Male + Amputation_Left_Hand_Female + 45c0b872-bdf1-466f-b810-c7783171bda1 + false + false + false + 8 + none + + \ No newline at end of file diff --git a/media/fileGuidTable.xml b/media/fileGuidTable.xml index 107fff3..b91d9b6 100644 --- a/media/fileGuidTable.xml +++ b/media/fileGuidTable.xml @@ -76,4 +76,9 @@ media/clothing/clothingItems/Prost_Left_LowerArm_MetalHand.xml 0405a4c0-f71b-45a8-9edc-489fc81dca39 + + + media/clothing/clothingItems/Amputation_Left_Foot.xml + 45c0b872-bdf1-466f-b810-c7783171bda1 + \ No newline at end of file diff --git a/media/lua/client/TOC_Animations.lua b/media/lua/client/TOC_Animations.lua new file mode 100644 index 0000000..4d2d787 --- /dev/null +++ b/media/lua/client/TOC_Animations.lua @@ -0,0 +1,24 @@ +-- Thanks to Glytcher and Matías N. Salas for helping out with this + + + + + +function SetMissingFootAnimation(check) + + + local player = getPlayer() + + if check then + player:setVariable("IsCrawling", "true") + else + player:setVariable("IsCrawling", "false") + end + + -- if isClient() then + -- sendClientCommand("TOC", "SetCrawlAnimation", {}) + -- end + +end + + diff --git a/media/lua/client/TOC_Client.lua b/media/lua/client/TOC_Client.lua index 7a862ec..2e90144 100644 --- a/media/lua/client/TOC_Client.lua +++ b/media/lua/client/TOC_Client.lua @@ -208,6 +208,26 @@ end +-- ANIMATIONS +----------------------- +Commands["SetCrawlAnimation"] = function(args) + + local source = getPlayer() + local player = getPlayerByOnlineID(args.id) + + if source ~= player then + if args.hasInjury then + player:setVariable('SetCrawlAnimation', 'true'); + else + player:setVariable('SetCrawlAnimation', 'false'); + end + end + +end + + + + -- Base stuff local function OnTocServerCommand(module, command, args) diff --git a/media/lua/client/TOC_OverridenFunctions.lua b/media/lua/client/TOC_OverridenFunctions.lua index 34b92be..c2e63a7 100644 --- a/media/lua/client/TOC_OverridenFunctions.lua +++ b/media/lua/client/TOC_OverridenFunctions.lua @@ -76,14 +76,18 @@ function ISInventoryPane:onMouseDoubleClick(x, y) local item_to_check = self.items[self.mouseOverOption] local player_inventory = getPlayerInventory(self.player).inventory - if instanceof(item_to_check, "InventoryItem") then - og_ISInventoryPaneOnMouseDoubleClick(self, x, y) - elseif CheckIfItemIsAmputatedLimb(item_to_check.items[1]) or CheckIfItemIsInstalledProsthesis(item_to_check.items[1]) then - --print("TOC: Can't double click this item") - else - og_ISInventoryPaneOnMouseDoubleClick(self, x, y) +----------------------------------------------------------------------------------- + -- TODO THIS IS DISABLED ONLY FOR TEST!!!!! REMEMBER TO RESTORE IT +----------------------------------------------------------------------------------- - end + -- if instanceof(item_to_check, "InventoryItem") then + -- og_ISInventoryPaneOnMouseDoubleClick(self, x, y) + -- elseif CheckIfItemIsAmputatedLimb(item_to_check.items[1]) or CheckIfItemIsInstalledProsthesis(item_to_check.items[1]) then + -- --print("TOC: Can't double click this item") + -- else + + -- end + og_ISInventoryPaneOnMouseDoubleClick(self, x, y) @@ -96,13 +100,17 @@ function ISInventoryPane.getActualItems(items) local ret = og_ISInventoryPaneGetActualItems(items) -- This is gonna be slower than just overriding the function but hey it's more compatible +----------------------------------------------------------------------------------- + -- TODO THIS IS DISABLED ONLY FOR TEST!!!!! REMEMBER TO RESTORE IT +----------------------------------------------------------------------------------- - for i = 1, #ret do - local item_full_type = ret[i]:getFullType() - if string.find(item_full_type, "Amputation_") or string.find(item_full_type, "Prost_") then - table.remove(ret, i) - end - end + + -- for i = 1, #ret do + -- local item_full_type = ret[i]:getFullType() + -- if string.find(item_full_type, "Amputation_") or string.find(item_full_type, "Prost_") then + -- table.remove(ret, i) + -- end + -- end return ret end diff --git a/media/lua/client/TOC_Update.lua b/media/lua/client/TOC_Update.lua index 2b9cce7..3b6cce5 100644 --- a/media/lua/client/TOC_Update.lua +++ b/media/lua/client/TOC_Update.lua @@ -176,12 +176,29 @@ end -- MAIN UPDATE FUNCTIONS +local testOnAnimEvent = IsoGameCharacter.OnAnimEvent + +function IsoGameCharacter.OnAnimEvent(animLayer, animEvent) + print("ENTERING ON ANIM EVENT!!!") +end + + + local function TocUpdateOnTick() local player = getPlayer() if player == nil then return end + + + + + + + + + local toc_data = player:getModData().TOC if toc_data ~= nil then CheckIfPlayerIsInfected(player, toc_data) diff --git a/media/lua/server/TOC_MP_server.lua b/media/lua/server/TOC_MP_server.lua index a0587df..d699978 100644 --- a/media/lua/server/TOC_MP_server.lua +++ b/media/lua/server/TOC_MP_server.lua @@ -24,6 +24,14 @@ TOC_Commands["AskDamageOtherPlayer"] = function(_, arg) end +-------- ANIMATIONS +TOC_Commands["SetCrawlAnimation"] = function(player, args) + + local player_id = player:getOnlineID() + + sendServerCommand(player, "TOC", "SetCrawlAnimation", {}) + +end diff --git a/media/lua/shared/NPCs/ExtraBodyLocations.lua b/media/lua/shared/NPCs/ExtraBodyLocations.lua index 828e213..caee784 100644 --- a/media/lua/shared/NPCs/ExtraBodyLocations.lua +++ b/media/lua/shared/NPCs/ExtraBodyLocations.lua @@ -18,7 +18,7 @@ local function addBodyLocationBefore(newLocation, movetoLocation) - list:remove(list:size()-1) + list:remove(newItem) local i = group:indexOf(movetoLocation) list:add(i, newItem) end @@ -70,6 +70,7 @@ local group = BodyLocations.getGroup("Human") addBodyLocationBefore("TOC_ArmRight", "Shoes") addBodyLocationBefore("TOC_ArmLeft", "Shoes") +addBodyLocationBefore("TOC_LegLeft", "Shoes") addBodyLocationBefore("TOC_ArmRightProsthesis", "Shoes") addBodyLocationBefore("TOC_ArmLeftProsthesis", "Shoes") diff --git a/media/scripts/TOC_items.txt b/media/scripts/TOC_items.txt index f06ba7b..5c13ecd 100644 --- a/media/scripts/TOC_items.txt +++ b/media/scripts/TOC_items.txt @@ -440,4 +440,20 @@ item ProthesisMag3 ReplaceOnUse = ProthesisMag3, Tooltip = Tooltip_ProthesisMag2, } + +item Amputation_Left_Foot + { + Weight = 1, + Type = Clothing, + DisplayCategory = Test, + DisplayName = amp test foot, + ClothingItem = Amputation_Left_Foot, + BodyLocation = TOC_LegLeft, + BloodLocation = Hands, + Icon = woodenHook, + Tooltip = test, + CanHaveHoles = false, + } + + } \ No newline at end of file diff --git a/python_helpers/modules_prost.xlsx b/python_helpers/modules_prost.xlsx index ae55b86..27265b1 100644 Binary files a/python_helpers/modules_prost.xlsx and b/python_helpers/modules_prost.xlsx differ