From b1828a3e4c832dcd9f725598ebaf084b7c729026 Mon Sep 17 00:00:00 2001 From: capitalthree Date: Sat, 25 Nov 2023 21:06:27 -0600 Subject: [PATCH] simplified collision box matching selection box --- stones.lua | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/stones.lua b/stones.lua index 8ed9671..bd72d01 100644 --- a/stones.lua +++ b/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 = "",