mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2025-07-06 08:30:21 +02:00
Rewrite lighting to use engine's 6d facedir prediction code
changed the names of a couple of internal functions to compensate. this makes lib_6d.lua obsolete.
This commit is contained in:
15
init.lua
15
init.lua
@ -59,8 +59,21 @@ function homedecor.table_copy(t)
|
||||
return nt
|
||||
end
|
||||
|
||||
-- protection wrapper for 6d stuff
|
||||
|
||||
function homedecor.protect_and_rotate(itemstack, placer, pointed_thing)
|
||||
if not homedecor.node_is_owned(pointed_thing.under, placer)
|
||||
and not homedecor.node_is_owned(pointed_thing.above, placer) then
|
||||
local keys=placer:get_player_control()
|
||||
minetest.rotate_and_place(itemstack, placer, pointed_thing,
|
||||
homedecor.expect_infinite_stacks, {invert_wall = keys.sneak})
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
|
||||
-- load various other components
|
||||
|
||||
dofile(homedecor.modpath.."/ownership.lua")
|
||||
dofile(homedecor.modpath.."/lib_6d.lua")
|
||||
|
||||
dofile(homedecor.modpath.."/misc_nodes.lua") -- the catch-all for all misc nodes
|
||||
dofile(homedecor.modpath.."/tables.lua")
|
||||
|
Reference in New Issue
Block a user