Project Zomboid

Project Zomboid

HydroCraft b41 Continued
i fix the trunk stuck if too heavy and create an standalone mod for wooden wheelbarrow
standalone mod wooden wheelbarrow
github-zip-download [github.com]

video showing the bug issue
https://www.youtube.com/watch?v=w1RhFGQgwjs&t=231s

manual fix:
now when you right click > Push Cart you can take it back
replace
"%USERPROFILE%/Zomboid/mods/2778991696 Hydrocraft/media/lua/server/PFG.lua"
by
https://raw.githubusercontent.com/rslgp/Hydrocraft/a0d7bdc098d0becc2c7c45812715eda0f1ea3208/Contents/mods/Hydrocraft/media/lua/server/PFG.lua

--last line of PFG.lua PFGMenu.addInventoryContext = function(player,context,inventoryObjects) local pzPlayer = getSpecificPlayer(player) local playerInventory = pzPlayer:getInventory() local items = inventoryObjects for i,v in pairs(items) do if v.cat == "Container" then --dont show push inside player inventory if playerInventory:contains(v.items) then return end

local itemClicked = v.items:getItemContainer()

local type = itemClicked:getType()
for ti,tv in ipairs(PFGMenu.typesTable) do
if tv == type then
local selectOption = context:addOption("Push Cart",v.items,PFGMenu.pushCart,player,v.items)
end
end
end
end

end

PFGMenu.pushCart = function(worldobjects,player,item)
local pzPlayer = getSpecificPlayer(player)


--if on floor
if item:getWorldItem() then
PFGMenu.equipCart(worldobjects,player,item:getWorldItem())
else
--if inside trunk FIX BUG CANT GET BACK FROM TRUNK IF TOO HEAVY
ISTimedActionQueue.add(ISEquipHeavyItem:new(pzPlayer, item, 50))
end


end

Events.OnPreFillInventoryObjectContextMenu.Add(PFGMenu.addInventoryContext)
Terakhir diedit oleh Reifel; 9 Jan 2023 @ 4:42pm