|
|
@ -241,6 +241,11 @@ local function multi_eject(proximal, stone, speed, count, inv) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local firenode = "nc_fire:fire_burst" |
|
|
|
|
|
|
|
if not minetest.registered_nodes["nc_fire:fire_burst"] then |
|
|
|
|
|
|
|
firenode = "nc_fire:fire" |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
function lc_liberties.handle_placement(pos) |
|
|
|
function lc_liberties.handle_placement(pos) |
|
|
|
cache = {} |
|
|
|
cache = {} |
|
|
|
--minetest.chat_send_all(tostring(pos)) |
|
|
|
--minetest.chat_send_all(tostring(pos)) |
|
|
@ -288,7 +293,8 @@ function lc_liberties.handle_placement(pos) |
|
|
|
for i2, v2 in pairs(v.stones) do |
|
|
|
for i2, v2 in pairs(v.stones) do |
|
|
|
local under = check_position(v2 + down) |
|
|
|
local under = check_position(v2 + down) |
|
|
|
if (under:sub(1, 1) == "W") and (under:len() > 1) then |
|
|
|
if (under:sub(1, 1) == "W") and (under:len() > 1) then |
|
|
|
nodecore.set_loud(v2, {name = "nc_fire:fire"}) |
|
|
|
nodecore.sound_play("nc_fire_ignite", {gain = 1, pos = pos}) |
|
|
|
|
|
|
|
nodecore.set_loud(v2, {name = firenode}) |
|
|
|
else |
|
|
|
else |
|
|
|
nodecore.set_loud(v2, {name = "air"}) |
|
|
|
nodecore.set_loud(v2, {name = "air"}) |
|
|
|
end |
|
|
|
end |
|
|
@ -310,18 +316,20 @@ function lc_liberties.handle_placement(pos) |
|
|
|
local stone = minetest.get_node(pos).name |
|
|
|
local stone = minetest.get_node(pos).name |
|
|
|
nodecore.set_loud(pos, {name = "air"}) |
|
|
|
nodecore.set_loud(pos, {name = "air"}) |
|
|
|
nodecore.item_eject(pos, stone, 5) |
|
|
|
nodecore.item_eject(pos, stone, 5) |
|
|
|
else |
|
|
|
|
|
|
|
for x=pos.x-18, pos.x+18 do |
|
|
|
|
|
|
|
for z=pos.z-18, pos.z+18 do |
|
|
|
|
|
|
|
if (x ~= pos.x) or (z ~= pos.z) then |
|
|
|
|
|
|
|
nodecore.smokeclear({x = x, y = pos.y, z = z}) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nodecore.smokefx(pos, 300, 2) |
|
|
|
return |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for x=pos.x-18, pos.x+18 do |
|
|
|
|
|
|
|
for z=pos.z-18, pos.z+18 do |
|
|
|
|
|
|
|
if (x ~= pos.x) or (z ~= pos.z) then |
|
|
|
|
|
|
|
nodecore.smokeclear({x = x, y = pos.y, z = z}) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nodecore.smokefx(pos, 300, 2) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
function lc_liberties.handle_territory_fill(itemstack, placer, pointed_thing) |
|
|
|
function lc_liberties.handle_territory_fill(itemstack, placer, pointed_thing) |
|
|
|