Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ read_globals = {
"HasOwner",
"getLastOwner",
"GetNodeOwnerName",
"place_rotated",
}
2 changes: 1 addition & 1 deletion mod.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = moreblocks
description = Adds various miscellaneous blocks to the game.
optional_depends = default,stairs,farming,wool,basic_materials
optional_depends = default,stairs,farming,wool,basic_materials,place_rotated
min_minetest_version = 5.0.0
8 changes: 6 additions & 2 deletions stairsplus/common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,14 @@ stairsplus.register_single = function(category, alternate, info, modname, subnam

-- Darken light sources slightly to make up for their smaller visual size
def.light_source = math.max(0, (def.light_source or 0) - 1)

def.on_place = stairsplus.rotate_node_aux
def.groups = stairsplus:prepare_groups(fields.groups)

if category == "slab" then
if minetest.global_exists("place_rotated") then
def.on_place = place_rotated.slab
else
def.on_place = stairsplus.rotate_node_aux
end
if type(info) ~= "table" then
def.node_box = {
type = "fixed",
Expand All @@ -165,6 +168,7 @@ stairsplus.register_single = function(category, alternate, info, modname, subnam
def.description = desc_base .. alternate:gsub("_", " "):gsub("(%a)(%S*)", function(a, b) return a:upper() .. b end)
end
else
def.on_place = stairsplus.rotate_node_aux
def.description = desc_base
if category == "slope" then
def.drawtype = "mesh"
Expand Down
Loading