forked from VoxeLibre/VoxeLibre
make recovery compass spin randomly in other dimensions
This commit is contained in:
parent
7d57e73ae4
commit
7dacfe2cba
|
@ -209,7 +209,13 @@ minetest.register_globalstep(function(dtime)
|
||||||
stack:set_name("mcl_compass:"..random_frame .. "_recovery")
|
stack:set_name("mcl_compass:"..random_frame .. "_recovery")
|
||||||
else
|
else
|
||||||
local targetpos = minetest.string_to_pos(posstring)
|
local targetpos = minetest.string_to_pos(posstring)
|
||||||
stack:set_name("mcl_compass:"..get_compass_angle(pos,targetpos,dir).."_recovery")
|
local _, target_dim = y_to_layer(targetpos.y)
|
||||||
|
local _, p_dim = y_to_layer(pos.y)
|
||||||
|
if p_dim ~= target_dim then
|
||||||
|
stack:set_name("mcl_compass:"..random_frame.."_recovery")
|
||||||
|
else
|
||||||
|
stack:set_name("mcl_compass:"..get_compass_angle(pos,targetpos,dir).."_recovery")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
inv:set_stack("main",j,stack)
|
inv:set_stack("main",j,stack)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue