When regular eggs turn into rotten eggs in the Salt Box, they will spat out of the Salt Box, which differs from Spoiled Food, Spoiled Fish Morsel and Spoiled Fish Meat.
The conditionals in containers.lua for the saltbox:
function params.saltbox.itemtestfn(container, item, slot) return ((item:HasTag("fresh") or item:HasTag("stale") or item:HasTag("spoiled")) and item:HasTag("cookable") and not item:HasTag("deployable") and not item:HasTag("smallcreature") and item.replica.health == nil) or item:HasTag("saltbox_valid") end
In rottenfn() function in egg.lua, the rotten eggs don't have the saltbox_valid tag.
local function rottenfn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() MakeInventoryPhysics(inst) inst.AnimState:SetBank("birdegg") inst.AnimState:SetBuild("bird_eggs") inst.AnimState:PlayAnimation("rotten") inst:AddTag("icebox_valid") inst:AddTag("cattoy") -- no inst:AddTag("saltbox_valid") to prevent rotten eggs from being spat out.
Steps to Reproduce
-
3
There are no comments to display.
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 accountSign in
Already have an account? Sign in here.
Sign In Now