|
|
@ -71,17 +71,69 @@ local function reg(name, basename, basedef) |
|
|
|
on_construct = lc_liberties.handle_placement |
|
|
|
on_construct = lc_liberties.handle_placement |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local territory_name = modname .. ":territory_" .. string_lower(name) |
|
|
|
|
|
|
|
minetest.register_node(":" .. territory_name, { |
|
|
|
|
|
|
|
description = "Territory Marker", |
|
|
|
|
|
|
|
drawtype = "nodebox", |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_box = { |
|
|
|
|
|
|
|
type = "fixed", |
|
|
|
|
|
|
|
fixed = { |
|
|
|
|
|
|
|
{-2/16, -8/16, -2/16, 2/16, -7/16, 2/16}, |
|
|
|
|
|
|
|
{-3/16, -7/16, -3/16, 3/16, -6/16, 3/16}, |
|
|
|
|
|
|
|
{-2/16, -6/16, -2/16, 2/16, -5/16, 2/16}, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
selection_box = { |
|
|
|
|
|
|
|
type = "fixed", |
|
|
|
|
|
|
|
fixed = {-6/16, -8/16, -6/16, 6/16, 0/16, 6/16} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiles = { |
|
|
|
|
|
|
|
basedef.tiles[1] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
paramtype = "light", |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sunlight_propagates = true, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
groups = { |
|
|
|
|
|
|
|
snappy = 1, |
|
|
|
|
|
|
|
falling_node = 1, |
|
|
|
|
|
|
|
falling_repose = 1, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
go_team = name, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sounds = basedef.sounds, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
nodecore.register_craft({ |
|
|
|
nodecore.register_craft({ |
|
|
|
label = "shave " .. string_lower(desc) .. " into stones", |
|
|
|
label = "Chop scored cement into go stones", |
|
|
|
action = "pummel", |
|
|
|
action = "pummel", |
|
|
|
toolgroups = {choppy = 3}, |
|
|
|
toolgroups = {choppy = 3}, |
|
|
|
nodes = { |
|
|
|
nodes = { |
|
|
|
{ |
|
|
|
{ |
|
|
|
match = "nc_concrete:" .. name .. "_starcrossy_ply", |
|
|
|
match = "nc_concrete:" .. name .. "_starcrossy_ply", |
|
|
|
replace = "air" |
|
|
|
replace = "air" |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
items = {{name = piecename, count = 3, scatter = 4}}, |
|
|
|
items = {{name = piecename, count = 3, scatter = 4}}, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nodecore.register_craft({ |
|
|
|
|
|
|
|
label = "Smash go stones into territory markers", |
|
|
|
|
|
|
|
action = "pummel", |
|
|
|
|
|
|
|
toolgroups = {thumpy = 3}, |
|
|
|
|
|
|
|
nodes = { |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
match = piecename, |
|
|
|
|
|
|
|
replace = "air" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
items = {{name = territory_name, count = 9, scatter = 4}}, |
|
|
|
}) |
|
|
|
}) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|