From d5c6101c0f40f8898b7fd9db2bb2c999e63c132f Mon Sep 17 00:00:00 2001 From: Vanic Date: Sat, 4 Apr 2026 16:55:42 +0300 Subject: [PATCH] `PlayerInventory` & `PlayerInventoryUI`: remove group image animation. #34 --- mods/CORE/Player/src/Player/inventory.lua | 7 ------- .../src/PlayerInventoryUI/getCraftPane.lua | 6 +++--- ...inventory_craft_pane_group_button_overlay.png | Bin 0 -> 1495 bytes 3 files changed, 3 insertions(+), 10 deletions(-) create mode 100644 mods/UI/PlayerInventoryUI/textures/player_inventory_craft_pane_group_button_overlay.png diff --git a/mods/CORE/Player/src/Player/inventory.lua b/mods/CORE/Player/src/Player/inventory.lua index 98df051..201df04 100644 --- a/mods/CORE/Player/src/Player/inventory.lua +++ b/mods/CORE/Player/src/Player/inventory.lua @@ -27,13 +27,6 @@ PlayerInventoryUI:registerOnFormFieldActionMatch('.+::%S+::group_button',functio PlayerInventoryUI:showForm(playerName) end) -Smc.registerGlobalStepForEachPlayer(1, function(deltaTime, player) - local playerName = player:get_player_name() - if Smc.getActiveFormspec(playerName) == '' then - player:set_inventory_formspec(PlayerInventoryUI:getFormSpecString(playerName)) - end -end) - PlayerInventoryUI:registerOnFormFieldActionMatch('.+::craft_item', function(player, fieldName, fieldValue) ---@type InvRef local inv = player:get_inventory() diff --git a/mods/UI/PlayerInventoryUI/src/PlayerInventoryUI/getCraftPane.lua b/mods/UI/PlayerInventoryUI/src/PlayerInventoryUI/getCraftPane.lua index d400d1f..1566593 100644 --- a/mods/UI/PlayerInventoryUI/src/PlayerInventoryUI/getCraftPane.lua +++ b/mods/UI/PlayerInventoryUI/src/PlayerInventoryUI/getCraftPane.lua @@ -75,13 +75,13 @@ local function getCraftPane(self, playerName, paneType) craftsListForm: itemImage(w+0.0625, h+0.0625, 1, 1, output) else - local k = time%#craft+1 - craft = craft[k] + local craft = craft[1] assert(craft ~= nil) craftsListForm: imageButton(w, h, 1.125, 1.125, 'player_inventory_craft_pane_button_background.png', craft.group..'::'..paneType..'::group_button'): - itemImage(w+0.0625, h+0.0625, 1, 1, craft.output) + itemImage(w+0.0625, h+0.0625, 1, 1, craft.output): + image(w, h, 1.125, 1.125, 'player_inventory_craft_pane_group_button_overlay.png') end w = w + 1.125 diff --git a/mods/UI/PlayerInventoryUI/textures/player_inventory_craft_pane_group_button_overlay.png b/mods/UI/PlayerInventoryUI/textures/player_inventory_craft_pane_group_button_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..edc08c2c21dbbdc6f36d0c4cee0c904e597c7208 GIT binary patch literal 1495 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|#^NA%C&rs6b?Si}mUKs7M+SzC z{oH>NS%G|oWRD45bDP46hOx7_4S6Fo+k-*%fF5l;AAz zh%9Dc&{GCs#)_r(Wk5mp5>H=O_E#({yu5G4jO}MUTbfalrp(#^#)|Vr>mdKI;Vst0FW(0e*gdg literal 0 HcmV?d00001