Not_Wilson Posted August 21, 2016 Share Posted August 21, 2016 Not planning to put this in a workshop mod. Just playing around. Why gain sanity when it snows? Snow is very calming to watch and in my opinion, exciting and refreshing. I've been searching for the code that makes rain turn to snow in DST, but I'm having no luck. I figured it was an event and maybe I could base the sanity gain on that. Link to comment Share on other sites More sharing options...
Lumina Posted August 21, 2016 Share Posted August 21, 2016 It's possible (i'm not sure) that the snow is just a rain in winter, so maybe trying something like : gaining sanity during rain in winter ? I'm sure one of the great modder here will be able to help you more. Link to comment Share on other sites More sharing options...
Not_Wilson Posted August 22, 2016 Author Share Posted August 22, 2016 Bump, if that's ok. Link to comment Share on other sites More sharing options...
rezecib Posted August 22, 2016 Share Posted August 22, 2016 @DextersComicLaboratory It's controlled by the weather component, and registers some variables in the worldstate component. I'm guessing you want the sanity gain to occur specifically while it's snowing, as opposed to when snow is on the ground? inst:WatchWorldState("issnowing", function(inst, issnowing) if issnowing then inst.components.sanity._dapperness = inst.components.sanity._dapperness or inst.components.sanity.dapperness inst.components.sanity.dapperness = inst.components.sanity._dapperness + my_snow_dapperness_amount elseif inst.components.sanity._dapperness then inst.components.sanity.dapperness = inst.components.sanity._dapperness inst.components.sanity._dapperness = nil 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