Jump to content

Recommended Posts

--add this in mod main
AddPrefabPostInit("pigskin",function(inst)
    --inst:AddComponent("edible")--it is already edible for pigman and so
    inst.components.edible.healthvalue = 10--how much health
    inst.components.edible.hungervalue = 10--how much hunger
    inst.components.edible.sanityvalue = 10--how much sanity
    inst.components.edible.foodtype = FOODTYPE.MEAT--it looks meat
    
    inst:AddComponent("perishable")
    inst.components.perishable:SetPerishTime(480*50)--480s per day
    inst.components.perishable:StartPerishing()
    inst.components.perishable.onperishreplacement = "spoiled_food"
    
    inst:AddComponent("cookable")
    inst.components.cookable.product = "cookedmeat"--or you need to create a prefab
    
    inst:AddComponent("dryable")
    inst.components.dryable:SetProduct("meat_dried")--or create your own product
    inst.components.dryable:SetDryTime(480*3)
    --inst.components.dryable:SetBuildFile(dryable.build)--use official anim of create your own
    --inst.components.dryable:SetDriedBuildFile(dryable.dried_build)--use official anim of create your own
end)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...