m9m3x3 Posted September 29, 2019 Share Posted September 29, 2019 I want its freshness to be maintained when the character has food with expiration dates. I want the expiration date to be unlimited. (Still, I'm using a translator. Thank you for your time.) Link to comment Share on other sites More sharing options...
Ultroman Posted October 1, 2019 Share Posted October 1, 2019 Should the food also have unlimited expiration date when in the backpack, or only when in the character's inventory? Link to comment Share on other sites More sharing options...
m9m3x3 Posted October 6, 2019 Author Share Posted October 6, 2019 I want both (backpacks and inventory). Link to comment Share on other sites More sharing options...
Ultroman Posted October 7, 2019 Share Posted October 7, 2019 In that case, this should do it inst.ListenForEvent("itemget", function(inst, data) local item = data.item if item.components.edible and item.components.perishable and item.components.perishable.updatetask ~= nil then item.components.perishable:StopPerishing() item.wasperishing = true end end) inst.ListenForEvent("dropitem", function(inst, data) local item = data.item if item.wasperishing and item.components.edible and item.components.perishable and item.components.perishable.updatetask == nil then item.components.perishable:StartPerishing() end end) Link to comment Share on other sites More sharing options...
Recommended Posts
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