Open HugoQwerty opened 1 year ago
also you can use: Vanilla - put item into trashcan (that You can move so have one in your base) and 'delete all' HC - "bury trash" recipe.
I'll say adding on this is to add to HC ability to build trash can (small wooden box, like scale-down composer)
Wrote this for myself, feel free to add to HC.
Lets you discard broken weapons, good for spears / stone axes etc - saves you having to look for a body to put them on.
function Recipe.GetItemTypes.Weapon(scriptItems) local all = getScriptManager():getAllItems() for i=0, all:size()-1 do local item = all:get(i) local typeString = item:getTypeString() if typeString == "Weapon" and item:getConditionMax() > 0 then scriptItems:add( item ) end end end
function OnTest.WeaponIsBroken(item) if item:IsWeapon() and item:getCondition() == 0 then return true end return false end