Yessiest
2 years ago
4 changed files with 40 additions and 16 deletions
-
1mods/default/init.lua
-
23mods/default/stairgate_hack.lua
-
28mods/stairs/init.lua
-
4settingtypes.txt
@ -0,0 +1,23 @@ |
|||
local walign_stairs = minetest.settings:get_bool("stairs_world_align") |
|||
if not walign_stairs then |
|||
return |
|||
end |
|||
local stairs_ignore_str = minetest.settings:get("stairs_ignore") or "" |
|||
local stairs_ignore = {} |
|||
stairs_ignore_str:gsub("[^,]+",function(stairtype) |
|||
stairs_ignore[stairtype] = true |
|||
end) |
|||
minetest.___local_register_node = minetest.register_node |
|||
minetest.register_node = function(...) |
|||
local args = {...} |
|||
if (args[2].drawtype == "nodebox") and (args[1]:match("stair")) then |
|||
if not stairs_ignore[args[1]] then |
|||
for index,tile in pairs(args[2].tiles) do |
|||
if type(tile) == "table" then |
|||
tile.align_style = "world" |
|||
end |
|||
end |
|||
end |
|||
end |
|||
minetest.___local_register_node(unpack(args)) |
|||
end |
Write
Preview
Loading…
Cancel
Save
Reference in new issue