simplified collision box matching selection box

master
capitalthree 1 year ago
parent 3bd9a68534
commit b1828a3e4c
  1. 22
      stones.lua

@ -43,6 +43,11 @@ local function reg(name, basename, basedef)
end
nodeDesc = nodeDesc .. " Stone"
local stone_selection_box = {
type = "fixed",
fixed = {-7/16, -8/16, -7/16, 7/16, 0/16, 7/16}
}
minetest.register_node(":" .. piecename, {
description = nodeDesc,
drawtype = "nodebox",
@ -85,10 +90,8 @@ local function reg(name, basename, basedef)
}
},
selection_box = {
type = "fixed",
fixed = {-7/16, -8/16, -7/16, 7/16, 2/16, 7/16}
},
selection_box = stone_selection_box,
collision_box = stone_selection_box,
tiles = {
basedef.tiles[1]
@ -115,6 +118,11 @@ local function reg(name, basename, basedef)
on_dig = lc_liberties.handle_dig,
})
local territory_selection_box = {
type = "fixed",
fixed = {-5/16, -8/16, -5/16, 5/16, -2/16, 5/16}
}
local territory_name = modname .. ":territory_" .. string_lower(name)
minetest.register_node(":" .. territory_name, {
description = "Territory Marker",
@ -128,10 +136,8 @@ local function reg(name, basename, basedef)
}
},
selection_box = {
type = "fixed",
fixed = {-6/16, -8/16, -6/16, 6/16, 0/16, 6/16}
},
selection_box = territory_selection_box,
collision_box = territory_selection_box,
node_placement_prediction = "",

Loading…
Cancel
Save