forked from mtcontrib/witchcraft
parent
06a3ca6265
commit
dcdf6b3a9b
13
depends.txt
13
depends.txt
@ -1,13 +0,0 @@
|
||||
default
|
||||
vessels
|
||||
tnt
|
||||
fire
|
||||
playereffects
|
||||
player_monoids?
|
||||
farming?
|
||||
lightning?
|
||||
pmobs?
|
||||
hud_hunger?
|
||||
hunger_ng?
|
||||
moreplants?
|
||||
horror?
|
4
init.lua
4
init.lua
@ -3167,7 +3167,7 @@ minetest.register_node("witchcraft:potion_ggreen", {
|
||||
})
|
||||
local mtime = minetest.get_timeofday()
|
||||
if mtime >= 0.25 and mtime <= 0.75 then
|
||||
user:override_day_night_ratio(-mtime+0.5)
|
||||
user:override_day_night_ratio(math.min(math.max(-mtime+0.5, 0), 1))
|
||||
minetest.after(10, function()
|
||||
user:override_day_night_ratio(nil)
|
||||
end)
|
||||
@ -3391,7 +3391,7 @@ minetest.register_node("witchcraft:potion_blue2_2", {
|
||||
function lightchange(person, duration)
|
||||
local mtime = minetest.get_timeofday()
|
||||
if mtime <= 0.25 or mtime >= 0.75 then
|
||||
person:override_day_night_ratio(mtime+0.5)
|
||||
person:override_day_night_ratio(math.min(math.max(mtime+0.5, 0), 1))
|
||||
minetest.after(duration, function()
|
||||
person:override_day_night_ratio(nil)
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user