emrextreme Posted April 14 Share Posted April 14 Quote local _G = GLOBAL local TUNING = _G.TUNING local APPI = AddPrefabPostInit APPI("world", function(world) world:ListenForEvent("fullmoon", function() print("full moon, setting leif chances to 1/5") local LEIF_MIN_DAY = TUNING.LEIF_MIN_DAY local LEIF_PERCENT_CHANCE = TUNING.LEIF_PERCENT_CHANCE TUNING.LEIF_MIN_DAY = 0 TUNING.LEIF_PERCENT_CHANCE = 1/5 local function clocktick() local clock = _G.GetClock() if clock:IsNight() and clock:GetMoonPhase() == "full" then return end print("exiting full moon, setting leif chances back") TUNING.LEIF_MIN_DAY = LEIF_MIN_DAY TUNING.LEIF_PERCENT_CHANCE = LEIF_PERCENT_CHANCE world:RemoveEventCallback("clocktick", clocktick) end world:ListenForEvent("clocktick", clocktick) end) end) Why does the game says it's out of date? Link to comment Share on other sites More sharing options...
_zwb Posted April 15 Share Posted April 15 The out of date warning is only related to the API version in modinfo. Put this line in your modinfo.lua and it'll be fine: api_version = 6 Link to comment Share on other sites More sharing options...
emrextreme Posted April 15 Author Share Posted April 15 Thank you that did fix the out of date problem, sadly the mod didn't work. It couldn't even be enabled. 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