Rename weather_pack mod to mcl_weather

This commit is contained in:
Wuzzy 2017-11-21 01:35:31 +01:00
parent 37668eb1f9
commit 69ade14509
27 changed files with 240 additions and 240 deletions

View file

@ -3,4 +3,4 @@ mcl_util?
mcl_wool?
mcl_dye?
mcl_tnt?
weather_pack?
mcl_weather?

View file

@ -5,7 +5,7 @@ local enable_respawn = minetest.settings:get_bool("enable_bed_respawn")
if enable_respawn == nil then
enable_respawn = true
end
local weather_mod = minetest.get_modpath("weather_pack") ~= nil
local weather_mod = minetest.get_modpath("mcl_weather") ~= nil
-- Helper functions
@ -148,8 +148,8 @@ end
function mcl_beds.skip_thunderstorm()
-- Skip thunderstorm
if weather_mod and weather.get_weather() == "thunder" then
weather.change_weather("none")
if weather_mod and mcl_weather.get_weather() == "thunder" then
mcl_weather.change_weather("none")
-- Sleep for a half day (=minimum thunderstorm duration)
minetest.set_timeofday((minetest.get_timeofday() + 0.5) % 1)
return true
@ -174,7 +174,7 @@ function mcl_beds.on_rightclick(pos, player)
local tod = minetest.get_timeofday() * 24000
-- Values taken from Minecraft Wiki with offset of +6000
if tod < 18541 and tod > 5458 and (not weather_mod or (weather.get_weather() ~= "thunder")) then
if tod < 18541 and tod > 5458 and (not weather_mod or (mcl_weather.get_weather() ~= "thunder")) then
if mcl_beds.player[name] then
lay_down(player, nil, nil, false)
end

View file

@ -2,6 +2,6 @@ mcl_core
mcl_sounds
mcl_wool
mcl_torches
weather_pack
mcl_weather
mobs_mc
doc?

View file

@ -88,8 +88,8 @@ minetest.register_abm({
-- The decay branch (make farmland dry or turn back to dirt)
-- Don't decay while it's raining
if rain.raining then
if weather.is_outdoor(pos) then
if mcl_weather.rain.raining then
if mcl_weather.is_outdoor(pos) then
return
end
end