Adding Chainlink Fence and Preparing the mod for release

This commit is contained in:
Thomas--S 2016-09-08 21:52:24 +02:00
parent 07d2355a87
commit f2da2d6f1e
21 changed files with 1539 additions and 1320 deletions

10
api.lua
View File

@ -5,15 +5,15 @@
Category: Init
]]
local function copytable(orig)
function streets.copytable(orig)
local orig_type = type(orig)
local copy
if orig_type == 'table' then
copy = {}
for orig_key, orig_value in next, orig, nil do
copy[copytable(orig_key)] = copytable(orig_value)
copy[streets.copytable(orig_key)] = streets.copytable(orig_value)
end
setmetatable(copy, copytable(getmetatable(orig)))
setmetatable(copy, streets.copytable(getmetatable(orig)))
else
copy = orig
end
@ -33,11 +33,11 @@ function streets.load_submod(dirname)
end
function streets.register_road_surface(data)
streets.surfaces.surfacetypes["streets:"..data.name] = data
streets.surfaces.surfacetypes["streets:" .. data.name] = data
end
function streets.register_road_sign(data)
streets.signs.signtypes["streets:"..data.name] = data
streets.signs.signtypes["streets:" .. data.name] = data
end
function streets.register_road_marking(data)

View File

@ -5,21 +5,6 @@
Category: Init
]]
local function copytable(orig)
local orig_type = type(orig)
local copy
if orig_type == 'table' then
copy = {}
for orig_key, orig_value in next, orig, nil do
copy[copytable(orig_key)] = copytable(orig_value)
end
setmetatable(copy, copytable(getmetatable(orig)))
else
copy = orig
end
return copy
end
local register_surface_nodes = function(friendlyname, name, tiles, groups, sounds, craft)
minetest.register_node(":streets:" .. name, {
description = friendlyname,
@ -62,20 +47,28 @@ local register_sign_node = function(friendlyname, name, tiles, thickness)
behind_pos.x = behind_pos.x - 1
end
local behind_node = minetest.get_node(behind_pos)
local behind_nodes = {}
behind_nodes["streets:roadwork_traffic_barrier"] = true
behind_nodes["streets:concrete_wall"] = true
behind_nodes["technic:concrete_post"] = true
local under_pos = { x = pos.x, y = pos.y - 1, z = pos.z }
local under_node = minetest.get_node(under_pos)
local under_nodes = {}
under_nodes["streets:roadwork_traffic_barrier"] = true
under_nodes["streets:concrete_wall"] = true
under_nodes["technic:concrete_post"] = true
local upper_pos = { x = pos.x, y = pos.y + 1, z = pos.z }
local upper_node = minetest.get_node(upper_pos)
if minetest.registered_nodes[behind_node.name].groups.bigpole then
if minetest.registered_nodes[behind_node.name].streets_pole_connection[param2][behind_node.param2 + 1] ~= 1 then
node.name = node.name .. "_polemount"
minetest.set_node(pos, node)
end
elseif minetest.registered_nodes[under_node.name].groups.bigpole then
if minetest.registered_nodes[under_node.name].streets_pole_connection["t"][under_node.param2 + 1] == 1 then
node.name = node.name .. "_center"
minetest.set_node(pos, node)
end
if (minetest.registered_nodes[behind_node.name].groups.bigpole
and minetest.registered_nodes[behind_node.name].streets_pole_connection[param2][behind_node.param2 + 1] ~= 1)
or behind_nodes[behind_node.name] == true then
node.name = node.name .. "_polemount"
minetest.set_node(pos, node)
elseif (minetest.registered_nodes[under_node.name].groups.bigpole
and minetest.registered_nodes[under_node.name].streets_pole_connection["t"][under_node.param2 + 1] == 1)
or under_nodes[under_node.name] then
node.name = node.name .. "_center"
minetest.set_node(pos, node)
elseif minetest.registered_nodes[upper_node.name].groups.bigpole then
if minetest.registered_nodes[upper_node.name].streets_pole_connection["b"][upper_node.param2 + 1] == 1 then
node.name = node.name .. "_center"
@ -222,7 +215,7 @@ local register_marking_nodes = function(surface_friendlyname, surface_name, surf
tiles[1] = tiles[1] .. "^(" .. tex .. ")"
tiles[5] = tiles[5] .. "^(" .. tex .. ")^[transformR180"
tiles[6] = tiles[6] .. "^(" .. tex .. ")"
local groups = copytable(surface_groups)
local groups = streets.copytable(surface_groups)
groups.not_in_creative_inventory = 1
minetest.register_node(":streets:mark_" .. name:gsub("{color}", colorname:lower()) .. r .. "_on_" .. surface_name, {
description = surface_friendlyname .. " with Marking: " .. friendlyname .. rotation_friendly .. " " .. colorname,

View File

@ -8,11 +8,11 @@
streets.nodeboxes = {}
streets.nodeboxes.stair = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.5, 0.5}
{ -0.5, -0.5, -0.5, 0.5, 0, 0.5 },
{ -0.5, 0, 0, 0.5, 0.5, 0.5 }
}
streets.nodeboxes.slab = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5}
{ -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
}
if minetest.get_modpath("concrete") then

View File

@ -18,9 +18,9 @@ streets.conf = {
}
-- The API collects some data here
streets.surfaces = {surfacetypes = {}}
streets.labels = {labeltypes = {}}
streets.signs = {signtypes = {}}
streets.surfaces = { surfacetypes = {} }
streets.labels = { labeltypes = {} }
streets.signs = { signtypes = {} }
-- Load the API file
dofile(streets.conf.modpath .. "/api.lua")

View File

@ -6,24 +6,151 @@
minetest.register_node(":streets:delineator", {
description = "Delineator",
tiles = {"streets_delineator_top.png", "streets_delineator_top.png", "streets_delineator_left.png", "streets_delineator_right.png", "streets_delineator_back.png", "streets_delineator_front.png"},
tiles = { "streets_delineator_top.png", "streets_delineator_top.png", "streets_delineator_left.png", "streets_delineator_right.png", "streets_delineator_back.png", "streets_delineator_front.png" },
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {snappy = 2},
groups = { snappy = 2 },
light_source = 2,
sunlight_propagates = true,
node_box = {
type = "fixed",
fixed = {
{-0.125, -0.5, -0.0625, 0.125, 0.4375, 0.0625}, -- Body
{0, 0.4375, -0.0625, 0.125, 0.5, 0.0625}, -- Top
{ -0.125, -0.5, -0.0625, 0.125, 0.4375, 0.0625 }, -- Body
{ 0, 0.4375, -0.0625, 0.125, 0.5, 0.0625 }, -- Top
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.125, -0.5, -0.0625, 0.125, 0.5, 0.0625}, -- Body
{ -0.125, -0.5, -0.0625, 0.125, 0.5, 0.0625 }, -- Body
}
}
})
minetest.register_craft({
output = "streets:delineator 10",
recipe = {
{ "dye:orange", "default:steel_ingot", "dye:orange" },
{ "dye:white", "default:steel_ingot", "dye:black" }
}
})
minetest.register_node("streets:fence_chainlink", {
description = "Chainlink Fence",
paramtype = "light",
drawtype = "nodebox",
tiles = { "streets_fence_chainlink.png" },
sunlight_propagates = true,
groups = { snappy = 1, wall = 1 },
node_box = {
type = "connected",
fixed = { { -1 / 32, -0.5, -1 / 32, 1 / 32, 0.5, 1 / 32 } },
connect_front = { { 0, -0.5, -0.5, 0, 0.5, 0 } }, -- z-
connect_back = { { 0, -0.5, 0, 0, 0.5, 0.5 } }, -- z+
connect_left = { { -0.5, -0.5, 0, 0, 0.5, 0 } }, -- x-
connect_right = { { 0, -0.5, 0, 0.5, 0.5, 0 } }, -- x+
},
selection_box = {
type = "connected",
fixed = { { -1 / 16, -0.5, -1 / 16, 1 / 16, 0.5, 1 / 16 } },
connect_front = { { 0, -0.5, -0.5, 0, 0.5, 0 } }, -- z-
connect_back = { { 0, -0.5, 0, 0, 0.5, 0.5 } }, -- z+
connect_left = { { -0.5, -0.5, 0, 0, 0.5, 0 } }, -- x-
connect_right = { { 0, -0.5, 0, 0.5, 0.5, 0 } }, -- x+
},
connects_to = { "group:wall", "group:stone", "group:wood", "group:tree", "group:concrete" },
sound = default.node_sound_stone_defaults()
})
function toggleDoor(pos, node, player, action)
local name = player:get_player_name()
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, { protection_bypass = true }) then
minetest.record_protection_violation(pos, name)
return
end
local newnode = node
if action == "close" then
newnode.name = node.name:gsub("open", "closed")
elseif action == "open" then
newnode.name = node.name:gsub("closed", "open")
end
minetest.swap_node(pos, newnode)
local upper_pos = streets.copytable(pos)
upper_pos.y = upper_pos.y + 1
local upper_node = minetest.get_node(upper_pos)
if (upper_node.name == "streets:fence_chainlink_door_closed" and action == "open")
or (upper_node.name == "streets:fence_chainlink_door_open" and action == "close") then
toggleDoor(upper_pos, upper_node, player, action)
end
local under_pos = streets.copytable(pos)
under_pos.y = under_pos.y - 1
local under_node = minetest.get_node(under_pos)
if (under_node.name == "streets:fence_chainlink_door_closed" and action == "open")
or (under_node.name == "streets:fence_chainlink_door_open" and action == "close") then
toggleDoor(under_pos, under_node, player, action)
end
end
minetest.register_node("streets:fence_chainlink_door_open", {
description = "Chainlink Fence Door (Locked)",
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
tiles = { "streets_fence_chainlink_door.png" },
sunlight_propagates = true,
groups = { snappy = 1, wall = 1, not_in_creative_inventory = 1 },
node_box = {
type = "fixed",
fixed = {
{ -16 / 32, -0.5, -1 / 32, -14 / 32, 0.5, 1 / 32 }, { 16 / 32, -0.5, -1 / 32, 14 / 32, 0.5, 1 / 32 },
{ -15 / 32, -0.5, 0, -15 / 32, 0.5, 0.5 }, { 15 / 32, -0.5, 0, 15 / 32, 0.5, 0.5 }
},
},
sound = default.node_sound_stone_defaults(),
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
toggleDoor(pos, node, player, "close")
end,
drop = "streets:fence_chainlink_door_closed",
})
minetest.register_node("streets:fence_chainlink_door_closed", {
description = "Chainlink Fence Door (Locked)",
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
tiles = { "streets_fence_chainlink_door.png" },
sunlight_propagates = true,
groups = { snappy = 1, wall = 1 },
node_box = {
type = "fixed",
fixed = {
{ -16 / 32, -0.5, -1 / 32, -14 / 32, 0.5, 1 / 32 }, { 16 / 32, -0.5, -1 / 32, 14 / 32, 0.5, 1 / 32 },
{ -15 / 32, -0.5, 0, 15 / 32, 0.5, 0 }
},
},
sound = default.node_sound_stone_defaults(),
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
toggleDoor(pos, node, player, "open")
end,
})
minetest.register_craft({
output = "streets:fence_chainlink 33",
recipe = {
{ "", "dye:dark_green", "" },
{ "default:steel_ingot", "default:stick", "default:steel_ingot" },
{ "default:steel_ingot", "default:stick", "default:steel_ingot" }
}
})
minetest.register_craft({
output = "streets:fence_chainlink_door_closed",
recipe = {
{ "streets:fence_chainlink", "streets:fence_chainlink", "" },
{ "streets:fence_chainlink", "streets:fence_chainlink", "" },
{ "streets:fence_chainlink", "streets:fence_chainlink", "" }
}
})

View File

@ -250,7 +250,14 @@ end
minetest.register_node(":streets:asphalt_workshop", {
description = "Asphalt Workshop",
tiles = { "default_wood.png", },
tiles = {
"default_steel_block.png^(streets_asphalt.png^[opacity:200)",
"default_steel_block.png^(streets_asphalt.png^[opacity:200)",
"default_steel_block.png^(streets_asphalt.png^[opacity:200)",
"default_steel_block.png^(streets_asphalt.png^[opacity:200)",
"default_steel_block.png^(streets_asphalt.png^[opacity:200)",
"default_steel_block.png^(streets_asphalt.png^[opacity:200)",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
@ -292,8 +299,17 @@ minetest.register_node(":streets:asphalt_workshop", {
minetest.register_lbm({
name = "streets:update_asphalt_workshop",
nodenames = {"streets:asphalt_workshop"},
nodenames = { "streets:asphalt_workshop" },
action = function(pos, node)
update_inventory(pos)
end,
})
minetest.register_craft({
output = "streets:asphalt_workshop",
recipe = {
{ "streets:asphalt", "streets:asphalt", "streets:asphalt" },
{ "streets:asphalt", "default:mese_crystal_fragment", "streets:asphalt" },
{ "streets:asphalt", "streets:asphalt", "streets:asphalt" },
}
})

View File

@ -10,7 +10,7 @@ local function toggle_bollard(pos, node, clicker, itemstack, pointed_thing, to_r
local ndef = minetest.registered_nodes[n.name]
if clicker and ndef.bollard.protection then
local name = clicker:get_player_name()
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, { protection_bypass = true }) then
minetest.record_protection_violation(pos, name)
return
end
@ -21,38 +21,47 @@ local function toggle_bollard(pos, node, clicker, itemstack, pointed_thing, to_r
return
end
end
minetest.set_node(pos, {name = ndef.bollard.counterpart, param2 = n.param2})
minetest.set_node(pos, { name = ndef.bollard.counterpart, param2 = n.param2 })
end
end
minetest.register_node("streets:bollard_driver", {
description = "Driver for Bollards",
tiles = {"streets_bollard_driver_top.png", "default_steel_block.png"},
groups = {cracky = 1},
tiles = { "streets_bollard_driver_top.png", "default_steel_block.png" },
groups = { cracky = 1 },
-- on_rightclick = toggle_bollard, -- Automatic bollards mustn't be toggled manually!
mesecons = {
effector = {
rules = mesecon.rules.default,
action_off = function (pos, node)
toggle_bollard(vector.add(pos, vector.new(0, 1, 0)), node, nil, nil, {type = "node", under = vector.add(pos, vector.new(0, -1, 0)), above = vector.add(pos, vector.new(0, 1, 0))},"up")
end,
action_on = function (pos, node)
toggle_bollard(vector.add(pos, vector.new(0, 1, 0)), node, nil, nil, {type = "node", under = vector.add(pos, vector.new(0, -1, 0)), above = vector.add(pos, vector.new(0, 1, 0))},"down")
end
}}
effector = {
rules = mesecon.rules.default,
action_off = function(pos, node)
toggle_bollard(vector.add(pos, vector.new(0, 1, 0)), node, nil, nil, { type = "node", under = vector.add(pos, vector.new(0, -1, 0)), above = vector.add(pos, vector.new(0, 1, 0)) }, "up")
end,
action_on = function(pos, node)
toggle_bollard(vector.add(pos, vector.new(0, 1, 0)), node, nil, nil, { type = "node", under = vector.add(pos, vector.new(0, -1, 0)), above = vector.add(pos, vector.new(0, 1, 0)) }, "down")
end
}
}
})
minetest.register_craft({
output = "streets:bollard_driver",
recipe = {
{ "default:steel_ingot", "streets:bollard_steel_automatic_up", "default:steel_ingot" },
{ "default:steel_ingot", "default:mese_crystal_fragment", "default:steel_ingot" },
}
})
minetest.register_node("streets:bollard_steel_automatic_up", {
description = "Steel Bollard",
tiles = {"streets_bollard_driver_top.png", "streets_bollard_driver_top.png", "streets_bollard_automatic_side.png"},
groups = {cracky = 1},
tiles = { "streets_bollard_driver_top.png", "streets_bollard_driver_top.png", "streets_bollard_automatic_side.png" },
groups = { cracky = 1 },
paramtype = "light",
drawtype = "nodebox",
sunlight_propagates = true,
node_box = {
type = "fixed",
fixed = {
{-0.3125, -0.5, -0.3125, 0.3125, 0.5, 0.3125}
{ -0.3125, -0.5, -0.3125, 0.3125, 0.5, 0.3125 }
}
},
bollard = {
@ -62,8 +71,8 @@ minetest.register_node("streets:bollard_steel_automatic_up", {
})
minetest.register_node("streets:bollard_steel_automatic_down", {
tiles = {"streets_bollard_driver_top.png", "streets_bollard_driver_top.png", "streets_bollard_automatic_side.png"},
groups = {cracky = 1,not_in_creative_inventory = 1},
tiles = { "streets_bollard_driver_top.png", "streets_bollard_driver_top.png", "streets_bollard_automatic_side.png" },
groups = { cracky = 1, not_in_creative_inventory = 1 },
drop = "streets:bollard_steel_automatic_up",
paramtype = "light",
drawtype = "nodebox",
@ -72,7 +81,7 @@ minetest.register_node("streets:bollard_steel_automatic_down", {
node_box = {
type = "fixed",
fixed = {
{-0.3125, -0.5, -0.3125, 0.3125, -0.4375, 0.3125}
{ -0.3125, -0.5, -0.3125, 0.3125, -0.4375, 0.3125 }
}
},
bollard = {
@ -81,10 +90,19 @@ minetest.register_node("streets:bollard_steel_automatic_down", {
}
})
minetest.register_craft({
output = "streets:bollard_steel_automatic_up",
recipe = {
{ "dye:red", "dye:white", "dye:red" },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
}
})
minetest.register_node("streets:bollard_steel_manual_up", {
description = "Manual Bollard",
tiles = {"streets_bollard_manual_top.png", "streets_bollard_manual_top.png", "streets_bollard_manual_side.png"},
groups = {cracky = 1},
tiles = { "streets_bollard_manual_top.png", "streets_bollard_manual_top.png", "streets_bollard_manual_side.png" },
groups = { cracky = 1 },
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
@ -93,7 +111,7 @@ minetest.register_node("streets:bollard_steel_manual_up", {
node_box = {
type = "fixed",
fixed = {
{-0.125, -0.5, -0.125, 0.125, 0.5, 0.125}
{ -0.125, -0.5, -0.125, 0.125, 0.5, 0.125 }
}
},
bollard = {
@ -104,9 +122,10 @@ minetest.register_node("streets:bollard_steel_manual_up", {
})
minetest.register_node("streets:bollard_steel_manual_down", {
tiles = {"streets_bollard_manual_side_down.png", "streets_bollard_manual_side_down.png^[transformR180", "streets_bollard_manual_side_down.png^[transformR270", "streets_bollard_manual_side_down.png^[transformR90", "streets_bollard_manual_top.png",
},
groups = {cracky = 1,not_in_creative_inventory = 1},
tiles = {
"streets_bollard_manual_side_down.png", "streets_bollard_manual_side_down.png^[transformR180", "streets_bollard_manual_side_down.png^[transformR270", "streets_bollard_manual_side_down.png^[transformR90", "streets_bollard_manual_top.png",
},
groups = { cracky = 1, not_in_creative_inventory = 1 },
drop = "streets:bollard_steel_manual_up",
paramtype = "light",
paramtype2 = "facedir",
@ -117,7 +136,7 @@ minetest.register_node("streets:bollard_steel_manual_down", {
node_box = {
type = "fixed",
fixed = {
{-0.125, -0.5, 0.125, 0.125, -0.25, 1.00}
{ -0.125, -0.5, 0.125, 0.125, -0.25, 1.00 }
}
},
bollard = {
@ -126,3 +145,12 @@ minetest.register_node("streets:bollard_steel_manual_down", {
protection = true
}
})
minetest.register_craft({
output = "streets:bollard_steel_manual_up",
recipe = {
{ "dye:red", "dye:white", "dye:red" },
{ "", "default:steel_ingot", "" },
{ "", "default:steel_ingot", "" },
}
})

View File

@ -11,17 +11,17 @@ else
minetest.register_node("streets:concrete", {
description = "Concrete",
tiles = {streets.concrete_texture},
groups = {cracky = 2, stone = 3},
sounds = default.node_sound_stone_defaults()
tiles = { streets.concrete_texture },
groups = { cracky = 2, stone = 3 },
sounds = default.node_sound_stone_defaults()
})
if minetest.get_modpath("moreblocks") or minetest.get_modpath("stairsplus") then
stairsplus:register_all("streets", "concrete", "streets:concrete", {
description = "Concrete",
tiles = {streets.concrete_texture},
groups = {cracky = 2, stone = 3},
tiles = { streets.concrete_texture },
groups = { cracky = 2, stone = 3 },
sounds = default.node_sound_stone_defaults()
})
end
@ -31,18 +31,18 @@ minetest.register_node("streets:concrete_wall", {
description = "Concrete Wall",
paramtype = "light",
drawtype = "nodebox",
tiles = {streets.concrete_texture},
tiles = { streets.concrete_texture },
sunlight_propagates = true,
groups = {cracky = 1, level = 2, wall = 1},
groups = { cracky = 1, level = 2, wall = 1 },
node_box = {
type = "connected",
fixed = {{-0.3, -0.5, -0.3, 0.3, -0.4, 0.3}, {-0.1, -0.5, -0.1, 0.1, 0.5, 0.1}},
connect_front = {{-0.3, -0.5, -0.5, 0.3, -0.4, 0.3}, {-0.1, -0.5, -0.5, 0.1, 0.5, 0.1}}, -- z-
connect_back = {{-0.3, -0.5, -0.3, 0.3, -0.4, 0.5}, {-0.1, -0.5, -0.1, 0.1, 0.5, 0.5}}, -- z+
connect_left = {{-0.5, -0.5, -0.3, 0.3, -0.4, 0.3}, {-0.5, -0.5, -0.1, 0.1, 0.5, 0.1}}, -- x-
connect_right = {{-0.3, -0.5, -0.3, 0.5, -0.4, 0.3}, {-0.1, -0.5, -0.1, 0.5, 0.5, 0.1}}, -- x+
fixed = { { -0.35, -0.5, -0.35, 0.35, -0.4, 0.35 }, { -0.15, -0.5, -0.15, 0.15, 0.5, 0.15 } },
connect_front = { { -0.35, -0.5, -0.5, 0.35, -0.4, 0.35 }, { -0.15, -0.5, -0.5, 0.15, 0.5, 0.15 } }, -- z-
connect_back = { { -0.35, -0.5, -0.35, 0.35, -0.4, 0.5 }, { -0.15, -0.5, -0.15, 0.15, 0.5, 0.5 } }, -- z+
connect_left = { { -0.5, -0.5, -0.35, 0.35, -0.4, 0.35 }, { -0.5, -0.5, -0.15, 0.15, 0.5, 0.15 } }, -- x-
connect_right = { { -0.35, -0.5, -0.35, 0.5, -0.4, 0.35 }, { -0.15, -0.5, -0.15, 0.5, 0.5, 0.15 } }, -- x+
},
connects_to = {"group:wall", "group:stone", "group:wood", "group:tree", "group:sign", "group:concrete"},
connects_to = { "group:wall", "group:stone", "group:wood", "group:tree", "group:concrete" },
sound = default.node_sound_stone_defaults()
})
@ -50,8 +50,8 @@ minetest.register_node("streets:concrete_wall", {
minetest.register_craft({
output = "streets:concrete_wall 5",
recipe = {
{"", "streets:concrete", ""},
{"", "streets:concrete", ""},
{"streets:concrete", "streets:concrete", "streets:concrete"},
{ "", "streets:concrete", "" },
{ "", "streets:concrete", "" },
{ "streets:concrete", "streets:concrete", "streets:concrete" },
}
})

View File

@ -7,88 +7,109 @@
for surface_name, surface_data in pairs(streets.surfaces.surfacetypes) do
minetest.register_node(":streets:" .. surface_name:sub(2, -1):split(":")[2] .. "_manhole", {
description = "Manhole",
tiles = {surface_data["tiles"][1] .. "^streets_manhole.png", surface_data.tiles[1]},
tiles = { surface_data["tiles"][1] .. "^streets_manhole.png", surface_data.tiles[1] },
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 3},
on_rightclick = function(pos, node, clicker)
if minetest.is_protected(pos, clicker) and not minetest.check_player_privs(clicker, {protection_bypass=true}) then
minetest.record_protection_violation(pos, clicker)
groups = { cracky = 3 },
on_rightclick = function(pos, node, name)
local name = name:get_player_name()
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, { protection_bypass = true }) then
minetest.record_protection_violation(pos, name)
return
end
node.name = node.name.."_open"
minetest.set_node(pos,node)
node.name = node.name .. "_open"
minetest.set_node(pos, node)
end,
sunlight_propagates = true,
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5, -0.375}, -- F
{-0.5, -0.5, 0.375, 0.5, 0.5, 0.5}, -- B
{-0.5, -0.5, -0.4375, -0.375, 0.5, 0.4375}, -- L
{0.375, -0.5, -0.4375, 0.5, 0.5, 0.4375}, -- R
{-0.25, 0.4375, -0.25, 0.25, 0.5, 0.25}, -- CenterPlate
{-0.5, 0.4375, -0.0625, 0.5, 0.5, 0.0625}, -- CenterLR
{-0.0625, 0.4375, -0.5, 0.0625, 0.5, 0.5}, -- CenterFR
}
{ -0.5, -0.5, -0.5, 0.5, 0.5, -0.375 }, -- F
{ -0.5, -0.5, 0.375, 0.5, 0.5, 0.5 }, -- B
{ -0.5, -0.5, -0.4375, -0.375, 0.5, 0.4375 }, -- L
{ 0.375, -0.5, -0.4375, 0.5, 0.5, 0.4375 }, -- R
{ -0.25, 0.4375, -0.25, 0.25, 0.5, 0.25 }, -- CenterPlate
{ -0.5, 0.4375, -0.0625, 0.5, 0.5, 0.0625 }, -- CenterLR
{ -0.0625, 0.4375, -0.5, 0.0625, 0.5, 0.5 }, -- CenterFR
}
},
})
minetest.register_node(":streets:" .. surface_name:sub(2, -1):split(":")[2] .. "_manhole_open", {
tiles = {surface_data["tiles"][1] .. "^streets_manhole.png", surface_data.tiles[1]},
tiles = { surface_data["tiles"][1] .. "^streets_manhole.png", surface_data.tiles[1] },
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
climbable = true,
drop = "streets:" .. surface_name:sub(2, -1):split(":")[2] .. "_manhole",
groups = {cracky = 3,not_in_creative_inventory = 1},
on_rightclick = function(pos, node, clicker)
if minetest.is_protected(pos, clicker) and not minetest.check_player_privs(clicker, {protection_bypass=true}) then
minetest.record_protection_violation(pos, clicker)
groups = { cracky = 3, not_in_creative_inventory = 1 },
on_rightclick = function(pos, node, name)
local name = name:get_player_name()
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, { protection_bypass = true }) then
minetest.record_protection_violation(pos, name)
return
end
node.name = string.sub(node.name,1,-6)
minetest.set_node(pos,node)
node.name = string.sub(node.name, 1, -6)
minetest.set_node(pos, node)
end,
sunlight_propagates = true,
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5, -0.375}, -- F
{-0.5, -0.5, 0.375, 0.5, 0.5, 0.5}, -- B
{-0.5, -0.5, -0.4375, -0.375, 0.5, 0.4375}, -- L
{0.375, -0.5, -0.4375, 0.5, 0.5, 0.4375}, -- R
}
{ -0.5, -0.5, -0.5, 0.5, 0.5, -0.375 }, -- F
{ -0.5, -0.5, 0.375, 0.5, 0.5, 0.5 }, -- B
{ -0.5, -0.5, -0.4375, -0.375, 0.5, 0.4375 }, -- L
{ 0.375, -0.5, -0.4375, 0.5, 0.5, 0.4375 }, -- R
}
},
})
minetest.register_craft({
output = "streets:" .. surface_name:sub(2, -1):split(":")[2] .. "_manhole 4",
recipe = {
{ surface_name, surface_name, surface_name },
{ surface_name, "default:steel_ingot", surface_name },
{ surface_name, surface_name, surface_name },
}
})
minetest.register_node(":streets:" .. surface_name:sub(2, -1):split(":")[2] .. "_stormdrain", {
description = "Stormdrain",
tiles = {surface_data["tiles"][1] .. "^streets_stormdrain.png", surface_data.tiles[1]},
tiles = { surface_data["tiles"][1] .. "^streets_stormdrain.png", surface_data.tiles[1] },
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 3},
groups = { cracky = 3 },
sunlight_propagates = true,
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5, -0.4375}, -- F
{-0.5, -0.5, 0.4375, 0.5, 0.5, 0.5}, -- B
{-0.5, -0.5, -0.4375, -0.375, 0.5, 0.4375}, -- L
{0.375, -0.5, -0.4375, 0.5, 0.5, 0.4375}, -- R
{-0.4375, 0.4375, 0, 0.4375, 0.5, 0.4375}, -- T1
{-0.3125, 0.4375, -0.4375, -0.25, 0.5, 0}, -- S1
{0.25, 0.4375, -0.4375, 0.3125, 0.5, 0}, -- S2
{-0.1875, 0.4375, -0.4375, -0.125, 0.5, 0}, -- S3
{0.125, 0.4375, -0.4375, 0.1875, 0.5, 0}, -- S4
{-0.0625, 0.4375, -0.3125, 0.0625, 0.5, 0}, -- S5
{-0.125, 0.4375, -0.375, 0.125, 0.5, -0.3125}, -- S6
}
{ -0.5, -0.5, -0.5, 0.5, 0.5, -0.4375 }, -- F
{ -0.5, -0.5, 0.4375, 0.5, 0.5, 0.5 }, -- B
{ -0.5, -0.5, -0.4375, -0.375, 0.5, 0.4375 }, -- L
{ 0.375, -0.5, -0.4375, 0.5, 0.5, 0.4375 }, -- R
{ -0.4375, 0.4375, 0, 0.4375, 0.5, 0.4375 }, -- T1
{ -0.3125, 0.4375, -0.4375, -0.25, 0.5, 0 }, -- S1
{ 0.25, 0.4375, -0.4375, 0.3125, 0.5, 0 }, -- S2
{ -0.1875, 0.4375, -0.4375, -0.125, 0.5, 0 }, -- S3
{ 0.125, 0.4375, -0.4375, 0.1875, 0.5, 0 }, -- S4
{ -0.0625, 0.4375, -0.3125, 0.0625, 0.5, 0 }, -- S5
{ -0.125, 0.4375, -0.375, 0.125, 0.5, -0.3125 }, -- S6
}
},
selection_box = {
type = "regular"
}
})
minetest.register_craft({
output = "streets:" .. surface_name:sub(2, -1):split(":")[2] .. "_stormdrain 3",
recipe = {
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
{ surface_name, surface_name, surface_name },
}
})
end

View File

@ -5,11 +5,11 @@
]]
local nodebox = {
{-7/16, -7/16, -1/8, 7/16, 7/16, 1/8}, --Face
{-7/16, 0, -1/4, -3/8, 7/16, -1/8}, --Visor Left
{3/8, 0, -1/4, 7/16, 7/16, -1/8}, --Visor Right
{-7/16, 3/8, -5/16, 7/16, 7/16, -1/8}, --Visor Top
{-1/4, -1/4, 0.85, 1/4, 1/4, 1/8}, --Mounting Bracket
{ -7 / 16, -7 / 16, -1 / 8, 7 / 16, 7 / 16, 1 / 8 }, --Face
{ -7 / 16, 0, -1 / 4, -3 / 8, 7 / 16, -1 / 8 }, --Visor Left
{ 3 / 8, 0, -1 / 4, 7 / 16, 7 / 16, -1 / 8 }, --Visor Right
{ -7 / 16, 3 / 8, -5 / 16, 7 / 16, 7 / 16, -1 / 8 }, --Visor Top
{ -1 / 4, -1 / 4, 0.85, 1 / 4, 1 / 4, 1 / 8 }, --Mounting Bracket
}
minetest.register_node("streets:lane_use_off", {
@ -29,19 +29,18 @@ minetest.register_node("streets:lane_use_off", {
local meta = minetest.get_meta(pos)
meta:set_string("formspec", "field[channel;Channel;${channel}]")
end,
groups = {cracky = 3},
groups = { cracky = 3 },
node_box = {
type = "fixed",
fixed = nodebox
fixed = nodebox
},
selection_box = {
type = "fixed",
fixed = nodebox
fixed = nodebox
},
on_receive_fields = function(pos, formname, fields, sender)
local name = sender:get_player_name()
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, { protection_bypass = true }) then
minetest.record_protection_violation(pos, name)
return
end
@ -58,24 +57,24 @@ minetest.register_node("streets:lane_use_off", {
return
end
msg = msg:lower()
if (msg=="off") then
if (msg == "off") then
node.name = "streets:lane_use_off"
elseif (msg=="green") then
elseif (msg == "green") then
node.name = "streets:lane_use_green"
elseif (msg=="red") then
elseif (msg == "red") then
node.name = "streets:lane_use_red"
elseif (msg=="yellow") then
elseif (msg == "yellow") then
node.name = "streets:lane_use_yellow"
end
minetest.set_node(pos,node)
minetest.get_meta(pos):set_string("channel",setchan)
minetest.set_node(pos, node)
minetest.get_meta(pos):set_string("channel", setchan)
end
}
}
})
for _,v in pairs({"green","yellow","red"}) do
minetest.register_node("streets:lane_use_"..v, {
for _, v in pairs({ "green", "yellow", "red" }) do
minetest.register_node("streets:lane_use_" .. v, {
drop = "streets:lane_use_off",
tiles = {
"streets_tl_bg.png",
@ -83,7 +82,7 @@ for _,v in pairs({"green","yellow","red"}) do
"streets_tl_bg.png",
"streets_tl_bg.png",
"streets_tl_bg.png",
"streets_laneuse_"..v..".png"
"streets_laneuse_" .. v .. ".png"
},
drawtype = "nodebox",
paramtype = "light",
@ -92,20 +91,19 @@ for _,v in pairs({"green","yellow","red"}) do
local meta = minetest.get_meta(pos)
meta:set_string("formspec", "field[channel;Channel;${channel}]")
end,
groups = {cracky = 3,not_in_creative_inventory = 1},
groups = { cracky = 3, not_in_creative_inventory = 1 },
light_source = 11,
node_box = {
type = "fixed",
fixed = nodebox
fixed = nodebox
},
selection_box = {
type = "fixed",
fixed = nodebox
fixed = nodebox
},
on_receive_fields = function(pos, formname, fields, sender)
local name = sender:get_player_name()
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, { protection_bypass = true }) then
minetest.record_protection_violation(pos, name)
return
end
@ -122,17 +120,17 @@ for _,v in pairs({"green","yellow","red"}) do
return
end
msg = msg:lower()
if (msg=="off") then
if (msg == "off") then
node.name = "streets:lane_use_off"
elseif (msg=="green") then
elseif (msg == "green") then
node.name = "streets:lane_use_green"
elseif (msg=="red") then
elseif (msg == "red") then
node.name = "streets:lane_use_red"
elseif (msg=="yellow") then
elseif (msg == "yellow") then
node.name = "streets:lane_use_yellow"
end
minetest.set_node(pos,node)
minetest.get_meta(pos):set_string("channel",setchan)
minetest.set_node(pos, node)
minetest.get_meta(pos):set_string("channel", setchan)
end
}
}
@ -142,8 +140,8 @@ end
minetest.register_craft({
output = "streets:lane_use_off",
recipe = {
{"default:steel_ingot","default:steel_ingot","default:steel_ingot"},
{"dye:red","dye:yellow","dye:green"},
{"default:steel_ingot","default:steel_ingot","default:steel_ingot"}
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
{ "dye:red", "dye:yellow", "dye:green" },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
}
})

View File

@ -204,3 +204,12 @@ minetest.register_entity("streets:matrix_screen_lights", {
end, pos)
end,
})
minetest.register_craft({
output = "streets:matrix_screen_base",
recipe = {
{ "dye:yellow", "default:steel_ingot", "dye:yellow" },
{ "default:steel_ingot", "digilines:lcd", "default:steel_ingot" },
{ "dye:yellow", "default:steel_ingot", "dye:yellow" },
}
})

View File

@ -9,44 +9,44 @@ minetest.register_node(":streets:bigpole", {
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
tiles = {"streets_pole.png"},
tiles = { "streets_pole.png" },
sunlight_propagates = true,
groups = {cracky = 1, level = 2, bigpole = 1},
groups = { cracky = 1, level = 2, bigpole = 1 },
node_box = {
type = "fixed",
fixed = {
{-0.15, -0.5, -0.15, 0.15, 0.5, 0.15}
{ -0.15, -0.5, -0.15, 0.15, 0.5, 0.15 }
}
},
on_place = minetest.rotate_node,
digiline = {
wire = {
rules = {
{x= 0, y= 0, z=-1},
{x= 0, y= 0, z= 1},
{x= 1, y= 0, z= 0},
{x=-1, y= 0, z= 0},
{x= 0, y=-1, z= 0},
{x= 0, y= 1, z= 0},
{x= 0, y=-2, z= 0}
{ x = 0, y = 0, z = -1 },
{ x = 0, y = 0, z = 1 },
{ x = 1, y = 0, z = 0 },
{ x = -1, y = 0, z = 0 },
{ x = 0, y = -1, z = 0 },
{ x = 0, y = 1, z = 0 },
{ x = 0, y = -2, z = 0 }
}
}
},
streets_pole_connection = {
[0] = {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
[1] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0},
[2] = {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
[3] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0},
["t"] = {1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1},
["b"] = {1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1}
}
[0] = { 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
[1] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0 },
[2] = { 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
[3] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0 },
["t"] = { 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1 },
["b"] = { 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1 }
}
})
minetest.register_craft({
output = "streets:bigpole 3",
recipe = {
{"default:steel_ingot"},
{"default:steel_ingot"}
{ "default:steel_ingot" },
{ "default:steel_ingot" }
}
})
@ -56,42 +56,42 @@ minetest.register_node(":streets:bigpole_short", {
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
tiles = {"streets_pole.png"},
tiles = { "streets_pole.png" },
sunlight_propagates = true,
groups = {cracky = 1, level = 2, bigpole = 1},
groups = { cracky = 1, level = 2, bigpole = 1 },
node_box = {
type = "fixed",
fixed = {
{-0.15, -0.5, -0.15, 0.15, 0.15, 0.15}
{ -0.15, -0.5, -0.15, 0.15, 0.15, 0.15 }
}
},
on_place = minetest.rotate_node,
digiline = {
wire = {
rules = {
{x= 0, y= 0, z=-1},
{x= 0, y= 0, z= 1},
{x= 1, y= 0, z= 0},
{x=-1, y= 0, z= 0},
{x= 0, y=-1, z= 0},
{x= 0, y= 1, z= 0},
{ x = 0, y = 0, z = -1 },
{ x = 0, y = 0, z = 1 },
{ x = 1, y = 0, z = 0 },
{ x = -1, y = 0, z = 0 },
{ x = 0, y = -1, z = 0 },
{ x = 0, y = 1, z = 0 },
}
}
},
streets_pole_connection = {
[0] = {0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
[1] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0},
[2] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
[3] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0},
["t"] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1},
["b"] = {1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
[0] = { 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
[1] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 },
[2] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
[3] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0 },
["t"] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1 },
["b"] = { 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
}
})
minetest.register_craft({
output = "streets:bigpole_short 2",
recipe = {
{"streets:bigpole"}
{ "streets:bigpole" }
}
})
@ -101,52 +101,52 @@ minetest.register_node(":streets:bigpole_edge", {
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
tiles = {"streets_pole.png"},
tiles = { "streets_pole.png" },
sunlight_propagates = true,
groups = {cracky = 1, level = 2, bigpole = 1},
groups = { cracky = 1, level = 2, bigpole = 1 },
node_box = {
type = "fixed",
fixed = {
{-0.15, -0.5, -0.15, 0.15, 0.15, 0.15},
{-0.15, -0.15, -0.15, 0.15, 0.15, -0.5}
{ -0.15, -0.5, -0.15, 0.15, 0.15, 0.15 },
{ -0.15, -0.15, -0.15, 0.15, 0.15, -0.5 }
}
},
on_place = minetest.rotate_node,
digiline = {
wire = {
rules = {
{x= 0, y= 0, z=-1},
{x= 0, y= 0, z= 1},
{x= 1, y= 0, z= 0},
{x=-1, y= 0, z= 0},
{x= 0, y=-1, z= 0},
{x= 0, y= 1, z= 0},
{ x = 0, y = 0, z = -1 },
{ x = 0, y = 0, z = 1 },
{ x = 1, y = 0, z = 0 },
{ x = -1, y = 0, z = 0 },
{ x = 0, y = -1, z = 0 },
{ x = 0, y = 1, z = 0 },
}
}
},
streets_pole_connection = {
[0] = {1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0},
[1] = {0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1},
[2] = {0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0},
[3] = {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0},
["t"] = {0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1},
["b"] = {1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0}
[0] = { 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 },
[1] = { 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1 },
[2] = { 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0 },
[3] = { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0 },
["t"] = { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 },
["b"] = { 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0 }
}
})
minetest.register_craft({
output = "streets:bigpole_edge 3",
recipe = {
{"streets:bigpole","streets:bigpole"},
{"streets:bigpole",""}
{ "streets:bigpole", "streets:bigpole" },
{ "streets:bigpole", "" }
}
})
minetest.register_craft({
output = "streets:bigpole_edge 3",
recipe = {
{"streets:bigpole","streets:bigpole"},
{"","streets:bigpole"}
{ "streets:bigpole", "streets:bigpole" },
{ "", "streets:bigpole" }
}
})
@ -156,43 +156,43 @@ minetest.register_node(":streets:bigpole_tjunction", {
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
tiles = {"streets_pole.png"},
tiles = { "streets_pole.png" },
sunlight_propagates = true,
groups = {cracky = 1, level = 2, bigpole = 1},
groups = { cracky = 1, level = 2, bigpole = 1 },
node_box = {
type = "fixed",
fixed = {
{-0.15, -0.5, -0.15, 0.15, 0.15, 0.15},
{-0.15, -0.15, -0.5, 0.15, 0.15, 0.5}
{ -0.15, -0.5, -0.15, 0.15, 0.15, 0.15 },
{ -0.15, -0.15, -0.5, 0.15, 0.15, 0.5 }
}
},
on_place = minetest.rotate_node,
digiline = {
wire = {
rules = {
{x= 0, y= 0, z=-1},
{x= 0, y= 0, z= 1},
{x= 1, y= 0, z= 0},
{x=-1, y= 0, z= 0},
{x= 0, y=-1, z= 0},
{x= 0, y= 1, z= 0},
{ x = 0, y = 0, z = -1 },
{ x = 0, y = 0, z = 1 },
{ x = 1, y = 0, z = 0 },
{ x = -1, y = 0, z = 0 },
{ x = 0, y = -1, z = 0 },
{ x = 0, y = 1, z = 0 },
}
}
},
streets_pole_connection = {
[0] = {1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0},
[1] = {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1},
[2] = {1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0},
[3] = {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1},
["t"] = {0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1},
["b"] = {1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0}
[0] = { 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 },
[1] = { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1 },
[2] = { 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 },
[3] = { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1 },
["t"] = { 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1 },
["b"] = { 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0 }
}
})
minetest.register_craft({
output = "streets:bigpole_tjunction",
recipe = {
{"streets:bigpole_edge","streets:bigpole_short"},
{ "streets:bigpole_edge", "streets:bigpole_short" },
}
})
@ -202,45 +202,45 @@ minetest.register_node(":streets:bigpole_corner", {
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
tiles = {"streets_pole.png"},
tiles = { "streets_pole.png" },
sunlight_propagates = true,
groups = {cracky = 1, level = 2, bigpole = 1},
groups = { cracky = 1, level = 2, bigpole = 1 },
node_box = {
type = "fixed",
fixed = {
{-0.15, -0.5, -0.15, 0.15, 0.15, 0.15},
{-0.15, -0.15, -0.15, 0.15, 0.15, -0.5},
{-0.15, -0.15, -0.15, 0.5, 0.15, 0.15}
{ -0.15, -0.5, -0.15, 0.15, 0.15, 0.15 },
{ -0.15, -0.15, -0.15, 0.15, 0.15, -0.5 },
{ -0.15, -0.15, -0.15, 0.5, 0.15, 0.15 }
}
},
on_place = minetest.rotate_node,
digiline = {
wire = {
rules = {
{x= 0, y= 0, z=-1},
{x= 0, y= 0, z= 1},
{x= 1, y= 0, z= 0},
{x=-1, y= 0, z= 0},
{x= 0, y=-1, z= 0},
{x= 0, y= 1, z= 0},
{ x = 0, y = 0, z = -1 },
{ x = 0, y = 0, z = 1 },
{ x = 1, y = 0, z = 0 },
{ x = -1, y = 0, z = 0 },
{ x = 0, y = -1, z = 0 },
{ x = 0, y = 1, z = 0 },
}
}
},
streets_pole_connection = {
[0] = {1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0},
[1] = {0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1},
[2] = {0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1},
[3] = {1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0},
["t"] = {0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1},
["b"] = {1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0}
[0] = { 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0 },
[1] = { 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1 },
[2] = { 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1 },
[3] = { 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0 },
["t"] = { 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1 },
["b"] = { 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0 }
}
})
minetest.register_craft({
output = "streets:bigpole_corner",
recipe = {
{"streets:bigpole_edge"},
{"streets:bigpole_short"}
{ "streets:bigpole_edge" },
{ "streets:bigpole_short" }
}
})
@ -250,45 +250,45 @@ minetest.register_node(":streets:bigpole_four_side_junction", {
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
tiles = {"streets_pole.png"},
tiles = { "streets_pole.png" },
sunlight_propagates = true,
groups = {cracky = 1, level = 2, bigpole = 1},
groups = { cracky = 1, level = 2, bigpole = 1 },
node_box = {
type = "fixed",
fixed = {
{-0.15, -0.5, -0.15, 0.15, 0.5, 0.15},
{-0.15, -0.15, -0.15, 0.15, 0.15, -0.5},
{-0.15, -0.15, -0.15, 0.5, 0.15, 0.15}
{ -0.15, -0.5, -0.15, 0.15, 0.5, 0.15 },
{ -0.15, -0.15, -0.15, 0.15, 0.15, -0.5 },
{ -0.15, -0.15, -0.15, 0.5, 0.15, 0.15 }
}
},
on_place = minetest.rotate_node,
digiline = {
wire = {
rules = {
{x= 0, y= 0, z=-1},
{x= 0, y= 0, z= 1},
{x= 1, y= 0, z= 0},
{x=-1, y= 0, z= 0},
{x= 0, y=-1, z= 0},
{x= 0, y= 1, z= 0},
{ x = 0, y = 0, z = -1 },
{ x = 0, y = 0, z = 1 },
{ x = 1, y = 0, z = 0 },
{ x = -1, y = 0, z = 0 },
{ x = 0, y = -1, z = 0 },
{ x = 0, y = 1, z = 0 },
}
}
},
streets_pole_connection = {
[0] = {1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0},
[1] = {0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1},
[2] = {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1},
[3] = {1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0},
["t"] = {1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1},
["b"] = {1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1}
[0] = { 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0 },
[1] = { 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1 },
[2] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1 },
[3] = { 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0 },
["t"] = { 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1 },
["b"] = { 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1 }
}
})
minetest.register_craft({
output = "streets:bigpole_four_side_junction",
recipe = {
{"streets:bigpole_short"},
{"streets:bigpole_corner"}
{ "streets:bigpole_short" },
{ "streets:bigpole_corner" }
}
})
@ -298,45 +298,45 @@ minetest.register_node(":streets:bigpole_cross", {
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
tiles = {"streets_pole.png"},
tiles = { "streets_pole.png" },
sunlight_propagates = true,
groups = {cracky = 1, level = 2, bigpole = 1},
groups = { cracky = 1, level = 2, bigpole = 1 },
node_box = {
type = "fixed",
fixed = {
{-0.15, -0.5, -0.15, 0.15, 0.5, 0.15},
{-0.15, -0.15, -0.5, 0.15, 0.15, 0.5}
{ -0.15, -0.5, -0.15, 0.15, 0.5, 0.15 },
{ -0.15, -0.15, -0.5, 0.15, 0.15, 0.5 }
}
},
on_place = minetest.rotate_node,
digiline = {
wire = {
rules = {
{x= 0, y= 0, z=-1},
{x= 0, y= 0, z= 1},
{x= 1, y= 0, z= 0},
{x=-1, y= 0, z= 0},
{x= 0, y=-1, z= 0},
{x= 0, y= 1, z= 0},
{ x = 0, y = 0, z = -1 },
{ x = 0, y = 0, z = 1 },
{ x = 1, y = 0, z = 0 },
{ x = -1, y = 0, z = 0 },
{ x = 0, y = -1, z = 0 },
{ x = 0, y = 1, z = 0 },
}
}
},
streets_pole_connection = {
[0] = {1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0},
[1] = {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1},
[2] = {1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0},
[3] = {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1},
["t"] = {1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1},
["b"] = {1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1}
[0] = { 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 },
[1] = { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1 },
[2] = { 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 },
[3] = { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1 },
["t"] = { 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1 },
["b"] = { 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1 }
}
})
minetest.register_craft({
output = "streets:bigpole_cross",
recipe = {
{"", "streets:bigpole_short", ""},
{"streets:bigpole_short", "", "streets:bigpole_short"},
{"", "streets:bigpole_short", ""},
{ "", "streets:bigpole_short", "" },
{ "streets:bigpole_short", "", "streets:bigpole_short" },
{ "", "streets:bigpole_short", "" },
}
})
@ -346,44 +346,44 @@ minetest.register_node(":streets:bigpole_five_side_junction", {
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
tiles = {"streets_pole.png"},
tiles = { "streets_pole.png" },
sunlight_propagates = true,
groups = {cracky = 1, level = 2, bigpole = 1},
groups = { cracky = 1, level = 2, bigpole = 1 },
node_box = {
type = "fixed",
fixed = {
{-0.15, -0.5, -0.15, 0.15, 0.5, 0.15},
{-0.15, -0.15, -0.5, 0.15, 0.15, 0.5},
{-0.15,-0.15,-0.15,0.5,0.15,0.15}
{ -0.15, -0.5, -0.15, 0.15, 0.5, 0.15 },
{ -0.15, -0.15, -0.5, 0.15, 0.15, 0.5 },
{ -0.15, -0.15, -0.15, 0.5, 0.15, 0.15 }
}
},
on_place = minetest.rotate_node,
digiline = {
wire = {
rules = {
{x= 0, y= 0, z=-1},
{x= 0, y= 0, z= 1},
{x= 1, y= 0, z= 0},
{x=-1, y= 0, z= 0},
{x= 0, y=-1, z= 0},
{x= 0, y= 1, z= 0},
{ x = 0, y = 0, z = -1 },
{ x = 0, y = 0, z = 1 },
{ x = 1, y = 0, z = 0 },
{ x = -1, y = 0, z = 0 },
{ x = 0, y = -1, z = 0 },
{ x = 0, y = 1, z = 0 },
}
}
},
streets_pole_connection = {
[0] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0},
[1] = {0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1},
[2] = {1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1},
[3] = {1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1},
["t"] = {1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1},
["b"] = {1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1}
[0] = { 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0 },
[1] = { 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 },
[2] = { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1 },
[3] = { 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1 },
["t"] = { 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1 },
["b"] = { 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1 }
}
})
minetest.register_craft({
output = "streets:bigpole_fice_side_junction",
output = "streets:bigpole_five_side_junction",
recipe = {
{"streets:bigpole_cross", "streets:bigpole_short"}
{ "streets:bigpole_cross", "streets:bigpole_short" }
}
})
@ -393,43 +393,43 @@ minetest.register_node(":streets:bigpole_all_sides", {
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
tiles = {"streets_pole.png"},
tiles = { "streets_pole.png" },
sunlight_propagates = true,
groups = {cracky = 1, level = 2, bigpole = 1},
groups = { cracky = 1, level = 2, bigpole = 1 },
node_box = {
type = "fixed",
fixed = {
{-0.15, -0.5, -0.15, 0.15, 0.5, 0.15},
{-0.15, -0.15, -0.5, 0.15, 0.15, 0.5},
{-0.5, -0.15, -0.15, 0.5, 0.15, 0.15}
{ -0.15, -0.5, -0.15, 0.15, 0.5, 0.15 },
{ -0.15, -0.15, -0.5, 0.15, 0.15, 0.5 },
{ -0.5, -0.15, -0.15, 0.5, 0.15, 0.15 }
}
},
on_place = minetest.rotate_node,
digiline = {
wire = {
rules = {
{x= 0, y= 0, z=-1},
{x= 0, y= 0, z= 1},
{x= 1, y= 0, z= 0},
{x=-1, y= 0, z= 0},
{x= 0, y=-1, z= 0},
{x= 0, y= 1, z= 0},
{ x = 0, y = 0, z = -1 },
{ x = 0, y = 0, z = 1 },
{ x = 1, y = 0, z = 0 },
{ x = -1, y = 0, z = 0 },
{ x = 0, y = -1, z = 0 },
{ x = 0, y = 1, z = 0 },
}
}
},
streets_pole_connection = {
[0] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
[1] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
[2] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
[3] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
["t"] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
["b"] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
[0] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
[1] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
[2] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
[3] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
["t"] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
["b"] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
}
})
minetest.register_craft({
output = "streets:bigpole_all_sides",
recipe = {
{"streets:bigpole_short", "streets:bigpole_cross", "streets:bigpole_short"}
{ "streets:bigpole_short", "streets:bigpole_cross", "streets:bigpole_short" }
}
})

View File

@ -7,12 +7,12 @@
--These register the sections in the workshop that these will be placed into
streets.labels.sections = {
{name="centerlines",friendlyname="Center Lines"},
{name="centerlinecorners",friendlyname="Center Line Corners/Junctions"},
{name="sidelines",friendlyname="Side Lines"},
{name="arrows",friendlyname="Arrows"},
{name="symbols",friendlyname="Symbols"},
{name="other",friendlyname="Other"}
{ name = "centerlines", friendlyname = "Center Lines" },
{ name = "centerlinecorners", friendlyname = "Center Line Corners/Junctions" },
{ name = "sidelines", friendlyname = "Side Lines" },
{ name = "arrows", friendlyname = "Arrows" },
{ name = "symbols", friendlyname = "Symbols" },
{ name = "other", friendlyname = "Other" }
}
@ -26,7 +26,7 @@ streets.register_road_marking({
tex = "streets_dashed_center_line.png",
section = "centerlines",
dye_needed = 1,
rotation = {r90 = 1},
rotation = { r90 = 1 },
})
streets.register_road_marking({
@ -35,7 +35,7 @@ streets.register_road_marking({
tex = "streets_solid_center_line.png",
section = "centerlines",
dye_needed = 2,
rotation = {r90 = 1},
rotation = { r90 = 1 },
})
@ -47,7 +47,7 @@ streets.register_road_marking({
tex = "streets_dashed_center_line_wide.png",
section = "centerlines",
dye_needed = 2,
rotation = {r90 = 1},
rotation = { r90 = 1 },
})
streets.register_road_marking({
@ -56,7 +56,7 @@ streets.register_road_marking({
tex = "streets_solid_center_line_wide.png",
section = "centerlines",
dye_needed = 4,
rotation = {r90 = 1},
rotation = { r90 = 1 },
})
@ -68,7 +68,7 @@ streets.register_road_marking({
tex = "streets_double_dashed_center_line.png",
section = "centerlines",
dye_needed = 2,
rotation = {r90 = 1},
rotation = { r90 = 1 },
})
streets.register_road_marking({
@ -77,7 +77,7 @@ streets.register_road_marking({
tex = "streets_double_solid_center_line.png",
section = "centerlines",
dye_needed = 4,
rotation = {r90 = 1},
rotation = { r90 = 1 },
})
streets.register_road_marking({
@ -86,7 +86,7 @@ streets.register_road_marking({
tex = "streets_mixed_center_line.png",
section = "centerlines",
dye_needed = 3,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -95,7 +95,7 @@ streets.register_road_marking({
tex = "streets_solid_line_offset.png",
section = "centerlines",
dye_needed = 2,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
@ -109,7 +109,7 @@ streets.register_road_marking({
tex = "streets_solid_center_line_corner.png",
section = "centerlinecorners",
dye_needed = 2,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -118,7 +118,7 @@ streets.register_road_marking({
tex = "streets_solid_center_line_tjunction.png",
section = "centerlinecorners",
dye_needed = 3,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -138,7 +138,7 @@ streets.register_road_marking({
tex = "streets_solid_center_line_wide_corner.png",
section = "centerlinecorners",
dye_needed = 4,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -147,7 +147,7 @@ streets.register_road_marking({
tex = "streets_solid_center_line_wide_tjunction.png",
section = "centerlinecorners",
dye_needed = 6,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -167,7 +167,7 @@ streets.register_road_marking({
tex = "streets_double_solid_center_line_corner.png",
section = "centerlinecorners",
dye_needed = 4,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -176,7 +176,7 @@ streets.register_road_marking({
tex = "streets_double_solid_center_line_tjunction.png",
section = "centerlinecorners",
dye_needed = 6,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -197,7 +197,7 @@ streets.register_road_marking({
tex = "streets_solid_side_line.png",
section = "sidelines",
dye_needed = 2,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -206,7 +206,7 @@ streets.register_road_marking({
tex = "streets_solid_side_line_corner.png",
section = "sidelines",
dye_needed = 4,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -215,7 +215,7 @@ streets.register_road_marking({
tex = "streets_dashed_side_line.png",
section = "sidelines",
dye_needed = 1,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
@ -227,7 +227,7 @@ streets.register_road_marking({
tex = "streets_solid_side_line_wide.png",
section = "sidelines",
dye_needed = 4,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -236,7 +236,7 @@ streets.register_road_marking({
tex = "streets_solid_side_line_wide_corner.png",
section = "sidelines",
dye_needed = 8,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -245,7 +245,7 @@ streets.register_road_marking({
tex = "streets_dashed_side_line_wide.png",
section = "sidelines",
dye_needed = 2,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
@ -257,7 +257,7 @@ streets.register_road_marking({
tex = "streets_solid_side_line_combinated_corner.png",
section = "sidelines",
dye_needed = 6,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -266,7 +266,7 @@ streets.register_road_marking({
tex = "streets_solid_side_line_combinated_corner.png^[transformFX",
section = "sidelines",
dye_needed = 6,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
@ -279,7 +279,7 @@ streets.register_road_marking({
tex = "streets_arrow_straight.png",
section = "arrows",
dye_needed = 2,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -288,7 +288,7 @@ streets.register_road_marking({
tex = "streets_arrow_right.png^[transformFX",
section = "arrows",
dye_needed = 2,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -297,7 +297,7 @@ streets.register_road_marking({
tex = "streets_arrow_right.png",
section = "arrows",
dye_needed = 2,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -306,7 +306,7 @@ streets.register_road_marking({
tex = "streets_arrow_right_straight.png^[transformFX",
section = "arrows",
dye_needed = 2,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -315,7 +315,7 @@ streets.register_road_marking({
tex = "streets_arrow_right_straight.png",
section = "arrows",
dye_needed = 2,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -324,7 +324,7 @@ streets.register_road_marking({
tex = "streets_arrow_right_straight.png^[transformFX^streets_arrow_right_straight.png",
section = "arrows",
dye_needed = 2,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -333,7 +333,7 @@ streets.register_road_marking({
tex = "streets_arrow_left_right.png",
section = "arrows",
dye_needed = 2,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
@ -345,7 +345,7 @@ streets.register_road_marking({
tex = "streets_parking.png",
section = "symbols",
dye_needed = 3,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -364,7 +364,7 @@ streets.register_road_marking({
tex = "streets_solid_stripe.png",
section = "other",
dye_needed = 4,
rotation = {r90 = 1},
rotation = { r90 = 1 },
})
streets.register_road_marking({
@ -373,7 +373,7 @@ streets.register_road_marking({
tex = "streets_solid_diagonal_line.png",
section = "other",
dye_needed = 2,
rotation = {r90 = 1},
rotation = { r90 = 1 },
})
streets.register_road_marking({
@ -382,7 +382,7 @@ streets.register_road_marking({
tex = "streets_double_solid_diagonal_line.png",
section = "other",
dye_needed = 4,
rotation = {r90 = 1},
rotation = { r90 = 1 },
})
streets.register_road_marking({
@ -391,7 +391,7 @@ streets.register_road_marking({
tex = "streets_halt_line_center_corner.png",
section = "other",
dye_needed = 4,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -400,7 +400,7 @@ streets.register_road_marking({
tex = "streets_halt_line_center_corner_wide.png",
section = "other",
dye_needed = 6,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -409,7 +409,7 @@ streets.register_road_marking({
tex = "streets_halt_line_center_corner.png^[transformFX",
section = "other",
dye_needed = 4,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})
streets.register_road_marking({
@ -418,5 +418,5 @@ streets.register_road_marking({
tex = "streets_halt_line_center_corner_wide.png^[transformFX",
section = "other",
dye_needed = 6,
rotation = {r90 = 1, r180 = 1, r270 = 1},
rotation = { r90 = 1, r180 = 1, r270 = 1 },
})

View File

@ -6,16 +6,16 @@
]]
streets.register_road_surface({
name="asphalt",
name = "asphalt",
friendlyname = "Asphalt",
tiles = {"streets_asphalt.png"},
groups = {cracky = 3,asphalt = 1},
tiles = { "streets_asphalt.png" },
groups = { cracky = 3, asphalt = 1 },
sounds = default.node_sound_stone_defaults(),
register_stairs = true,
craft = {
output = "streets:asphalt 1",
type = "cooking",
recipe = "default:gravel",
recipe = "default:gravel",
cooktime = 2
}
})
@ -23,14 +23,14 @@ streets.register_road_surface({
streets.register_road_surface({
name = "asphalt_red",
friendlyname = "Red Asphalt",
tiles = {"streets_asphalt_red.png"},
groups = {cracky = 3,asphalt = 1},
tiles = { "streets_asphalt_red.png" },
groups = { cracky = 3, asphalt = 1 },
sounds = default.node_sound_stone_defaults(),
register_stairs = true,
craft = {
output = "streets:asphalt_red 1",
type = "shapeless",
recipe = {"streets:asphalt", "dye:red"}
recipe = { "streets:asphalt", "dye:red" }
}
})
@ -51,29 +51,29 @@ streets.register_road_surface({
streets.register_road_surface({
name = "asphalt_blue",
friendlyname = "Blue Asphalt",
tiles = {"streets_asphalt_blue.png"},
groups = {cracky = 3,asphalt = 1},
tiles = { "streets_asphalt_blue.png" },
groups = { cracky = 3, asphalt = 1 },
sounds = default.node_sound_stone_defaults(),
register_stairs = false,
craft = {
output = "streets:asphalt_blue 1",
type = "shapeless",
recipe = {"streets:asphalt", "dye:blue"}
recipe = { "streets:asphalt", "dye:blue" }
}
})
minetest.register_node("streets:sidewalk", {
description = "Sidewalk",
tiles = {"streets_sidewalk.png"},
groups = {cracky = 3, stone = 1},
sounds = default.node_sound_stone_defaults()
tiles = { "streets_sidewalk.png" },
groups = { cracky = 3, stone = 1 },
sounds = default.node_sound_stone_defaults()
})
if minetest.get_modpath("moreblocks") or minetest.get_modpath("stairsplus") then
stairsplus:register_all("streets", "sidewalk", "streets:sidewalk", {
description = "Concrete",
tiles = {"streets_sidewalk.png"},
groups = {cracky = 3, asphalt = 1},
tiles = { "streets_sidewalk.png" },
groups = { cracky = 3, asphalt = 1 },
sounds = default.node_sound_stone_defaults()
})
end
@ -81,5 +81,5 @@ end
minetest.register_craft({
output = "streets:sidewalk 1",
type = "shapeless",
recipe = {"streets:asphalt", "dye:white"}
recipe = { "streets:asphalt", "dye:white" }
})

View File

@ -11,26 +11,26 @@ minetest.register_node("streets:roadwork_traffic_barrier", {
description = "Traffic Barrier",
paramtype = "light",
drawtype = "nodebox",
tiles = {streets.concrete_texture, streets.concrete_texture, streets.concrete_texture .. "^streets_roadwork_traffic_barrier.png"},
tiles = { streets.concrete_texture, streets.concrete_texture, streets.concrete_texture .. "^streets_roadwork_traffic_barrier.png" },
sunlight_propagates = true,
groups = {cracky = 1, level = 2, wall = 1},
groups = { cracky = 1, level = 2, wall = 1 },
node_box = {
type = "connected",
fixed = {{-0.3, -0.5, -0.3, 0.3, -0.4, 0.3}, {-0.1, -0.5, -0.1, 0.1, 0.5, 0.1}},
connect_front = {{-0.3, -0.5, -0.5, 0.3, -0.4, 0.3}, {-0.1, -0.5, -0.5, 0.1, 0.5, 0.1}}, -- z-
connect_back = {{-0.3, -0.5, -0.3, 0.3, -0.4, 0.5}, {-0.1, -0.5, -0.1, 0.1, 0.5, 0.5}}, -- z+
connect_left = {{-0.5, -0.5, -0.3, 0.3, -0.4, 0.3}, {-0.5, -0.5, -0.1, 0.1, 0.5, 0.1}}, -- x-
connect_right = {{-0.3, -0.5, -0.3, 0.5, -0.4, 0.3}, {-0.1, -0.5, -0.1, 0.5, 0.5, 0.1}}, -- x+
fixed = { { -0.35, -0.5, -0.35, 0.35, -0.4, 0.35 }, { -0.15, -0.5, -0.15, 0.15, 0.5, 0.15 } },
connect_front = { { -0.35, -0.5, -0.5, 0.35, -0.4, 0.35 }, { -0.15, -0.5, -0.5, 0.15, 0.5, 0.15 } }, -- z-
connect_back = { { -0.35, -0.5, -0.35, 0.35, -0.4, 0.5 }, { -0.15, -0.5, -0.15, 0.15, 0.5, 0.5 } }, -- z+
connect_left = { { -0.5, -0.5, -0.35, 0.35, -0.4, 0.35 }, { -0.5, -0.5, -0.15, 0.15, 0.5, 0.15 } }, -- x-
connect_right = { { -0.35, -0.5, -0.35, 0.5, -0.4, 0.35 }, { -0.15, -0.5, -0.15, 0.5, 0.5, 0.15 } }, -- x+
},
connects_to = {"group:wall", "group:stone", "group:wood", "group:tree", "group:sign", "group:concrete"},
connects_to = { "group:wall", "group:stone", "group:wood", "group:tree", "group:concrete" },
sound = default.node_sound_stone_defaults()
})
minetest.register_craft({
output = "streets:roadwork_traffic_barrier 3",
recipe = {
{"dye:red", "dye:white", "dye:red"},
{"streets:concrete_wall", "streets:concrete_wall", "streets:concrete_wall"},
{ "dye:red", "dye:white", "dye:red" },
{ "streets:concrete_wall", "streets:concrete_wall", "streets:concrete_wall" },
}
})
@ -41,30 +41,30 @@ minetest.register_node("streets:roadwork_barrier_tape", {
description = "Barrier Tape",
paramtype = "light",
drawtype = "nodebox",
tiles = {"streets_roadwork_barrier_tape.png"},
tiles = { "streets_roadwork_barrier_tape.png" },
sunlight_propagates = true,
groups = {choppy = 1, dig_immediate = 3, level = 1, wall = 1},
groups = { choppy = 1, dig_immediate = 3, level = 1, wall = 1 },
node_box = {
type = "connected",
fixed = {-1/16, -0.5, -1/16, 1/16, 0.5, 1/16},
connect_front = {0, 4/16, -0.5, 0, 6/16, 0}, -- z-
connect_back = {0, 4/16, 0, 0, 6/16, 0.5}, -- z+
connect_left = {-0.5, 4/16, 0, 0, 6/16, 0}, -- x-
connect_right = {0, 4/16, 0, 0.5, 6/16, 0}, -- x+
fixed = { -1 / 16, -0.5, -1 / 16, 1 / 16, 0.5, 1 / 16 },
connect_front = { 0, 4 / 16, -0.5, 0, 6 / 16, 0 }, -- z-
connect_back = { 0, 4 / 16, 0, 0, 6 / 16, 0.5 }, -- z+
connect_left = { -0.5, 4 / 16, 0, 0, 6 / 16, 0 }, -- x-
connect_right = { 0, 4 / 16, 0, 0.5, 6 / 16, 0 }, -- x+
},
selection_box = {
type = "fixed",
fixed = {-2/16, -0.5, -2/16, 2/16, 0.5, 2/16},
fixed = { -2 / 16, -0.5, -2 / 16, 2 / 16, 0.5, 2 / 16 },
},
connects_to = {"group:wall", "group:stone", "group:wood", "group:tree", "group:sign", "group:concrete"},
connects_to = { "group:wall", "group:stone", "group:wood", "group:tree", "group:sign", "group:concrete" },
})
minetest.register_craft({
output = "streets:roadwork_barrier_tape 24",
recipe = {
{"dye:red", "dye:white", "dye:red"},
{"farming:cotton", "default:stick", "farming:cotton"},
{"", "default:stick", ""}
{ "dye:red", "dye:white", "dye:red" },
{ "farming:cotton", "default:stick", "farming:cotton" },
{ "", "default:stick", "" }
}
})
@ -76,47 +76,47 @@ minetest.register_node("streets:roadwork_traffic_fence", {
description = "Traffic Fence",
paramtype = "light",
drawtype = "nodebox",
tiles = {"streets_roadwork_traffic_fence_top.png", "streets_roadwork_traffic_fence_top.png", "streets_roadwork_traffic_fence.png"},
tiles = { "streets_roadwork_traffic_fence_top.png", "streets_roadwork_traffic_fence_top.png", "streets_roadwork_traffic_fence.png" },
inventory_image = "streets_roadwork_traffic_fence.png",
wield_image = "streets_roadwork_traffic_fence.png",
sunlight_propagates = true,
groups = {cracky = 1, wall = 1},
groups = { cracky = 1, wall = 1 },
node_box = {
type = "connected",
fixed = {-1/16, -0.5, -1/16, 1/16, 0.5, 1/16},
connect_front = {
{-1/16, -0.5, -0.5, 1/16, -0.25, 1/16},
{-1/16, 0.25, -0.5, 1/16, 0.5, 1/16},
{-1/16, -0.25, -0.5, 1/16, 0.25, -7/16},
{-1/16, -0.25, -5/16, 1/16, 0.25, -3/16}
fixed = { -1 / 16, -0.5, -1 / 16, 1 / 16, 0.5, 1 / 16 },
connect_front = {
{ -1 / 16, -0.5, -0.5, 1 / 16, -0.25, 1 / 16 },
{ -1 / 16, 0.25, -0.5, 1 / 16, 0.5, 1 / 16 },
{ -1 / 16, -0.25, -0.5, 1 / 16, 0.25, -7 / 16 },
{ -1 / 16, -0.25, -5 / 16, 1 / 16, 0.25, -3 / 16 }
}, -- z-
connect_back = {
{-1/16, -0.5, -1/16, 1/16, -0.25, 0.5},
{-1/16, 0.25, -1/16, 1/16, 0.5, 0.5},
{-1/16, -0.25, 7/16, 1/16, 0.25, 0.5},
{-1/16, -0.25, 3/16, 1/16, 0.25, 5/16}
connect_back = {
{ -1 / 16, -0.5, -1 / 16, 1 / 16, -0.25, 0.5 },
{ -1 / 16, 0.25, -1 / 16, 1 / 16, 0.5, 0.5 },
{ -1 / 16, -0.25, 7 / 16, 1 / 16, 0.25, 0.5 },
{ -1 / 16, -0.25, 3 / 16, 1 / 16, 0.25, 5 / 16 }
}, -- z+
connect_left = {
{-0.5, -0.5, -1/16, 1/16, -0.25, 1/16},
{-0.5, 0.25, -1/16, 1/16, 0.5, 1/16},
{-0.5, -0.25, -1/16, -7/16, 0.25, 1/16},
{-5/16, -0.25, -1/16, -3/16, 0.25, 1/16}
connect_left = {
{ -0.5, -0.5, -1 / 16, 1 / 16, -0.25, 1 / 16 },
{ -0.5, 0.25, -1 / 16, 1 / 16, 0.5, 1 / 16 },
{ -0.5, -0.25, -1 / 16, -7 / 16, 0.25, 1 / 16 },
{ -5 / 16, -0.25, -1 / 16, -3 / 16, 0.25, 1 / 16 }
}, -- x-
connect_right = {
{-1/16, -0.5, -1/16, 0.5, -0.25, 1/16},
{-1/16, 0.25, -1/16, 0.5, 0.5, 1/16},
{7/16, -0.25, -1/16, 0.5, 0.25, 1/16},
{3/16, -0.25, -1/16, 5/16, 0.25, 1/16},
connect_right = {
{ -1 / 16, -0.5, -1 / 16, 0.5, -0.25, 1 / 16 },
{ -1 / 16, 0.25, -1 / 16, 0.5, 0.5, 1 / 16 },
{ 7 / 16, -0.25, -1 / 16, 0.5, 0.25, 1 / 16 },
{ 3 / 16, -0.25, -1 / 16, 5 / 16, 0.25, 1 / 16 },
} -- x+
},
connects_to = {"group:wall", "group:stone", "group:wood", "group:tree", "group:sign", "group:concrete"},
connects_to = { "group:wall", "group:stone", "group:wood", "group:tree", "group:sign", "group:concrete" },
})
minetest.register_craft({
output = "streets:roadwork_traffic_fence 3",
recipe = {
{"dye:red", "dye:white", "dye:red"},
{"xpanes:bar", "xpanes:bar", "xpanes:bar"},
{ "dye:red", "dye:white", "dye:red" },
{ "xpanes:bar", "xpanes:bar", "xpanes:bar" },
}
})
@ -128,16 +128,16 @@ minetest.register_node("streets:roadwork_pylon", {
description = "Pylon",
paramtype = "light",
drawtype = "nodebox",
tiles = {"streets_roadwork_pylon_top.png", "streets_roadwork_pylon_top.png", "streets_roadwork_pylon.png"},
tiles = { "streets_roadwork_pylon_top.png", "streets_roadwork_pylon_top.png", "streets_roadwork_pylon.png" },
sunlight_propagates = true,
groups = {cracky = 1},
groups = { cracky = 1 },
node_box = {
type = "fixed",
fixed = {
{-0.375, -0.5, -0.125, 0.375, -0.4375, 0.125},
{-0.125, -0.5, -0.375, 0.125, -0.4375, 0.375},
{-0.3125, -0.5, 0, 0.3125, 0.1875, 0},
{0, -0.5, -0.3125, 0, 0.1875, 0.3125},
{ -0.375, -0.5, -0.125, 0.375, -0.4375, 0.125 },
{ -0.125, -0.5, -0.375, 0.125, -0.4375, 0.375 },
{ -0.3125, -0.5, 0, 0.3125, 0.1875, 0 },
{ 0, -0.5, -0.3125, 0, 0.1875, 0.3125 },
}
}
})
@ -145,9 +145,9 @@ minetest.register_node("streets:roadwork_pylon", {
minetest.register_craft({
output = "streets:roadwork_pylon 3",
recipe = {
{"dye:orange", "", "dye:orange"},
{"dye:white", "default:stick", "dye:white"},
{"dye:orange", "default:steel_ingot", "dye:orange"},
{ "dye:orange", "", "dye:orange" },
{ "dye:white", "default:stick", "dye:white" },
{ "dye:orange", "default:steel_ingot", "dye:orange" },
}
})
@ -158,18 +158,18 @@ minetest.register_node("streets:roadwork_blinking_light_off", {
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
tiles = {"streets_roadwork_blinking_light_top.png", "streets_roadwork_blinking_light_top.png", "streets_roadwork_blinking_light_off.png"},
tiles = { "streets_roadwork_blinking_light_top.png", "streets_roadwork_blinking_light_top.png", "streets_roadwork_blinking_light_off.png" },
sunlight_propagates = true,
groups = {cracky = 1},
groups = { cracky = 1 },
node_box = {
type = "fixed",
fixed = {
{-0.1875, -0.5, -0.125, 0.1875, -0.3125, 0.125}, -- Base
{-0.1875, -0.3125, 0, 0.1875, 0.0625, 0}, -- Light
{ -0.1875, -0.5, -0.125, 0.1875, -0.3125, 0.125 }, -- Base
{ -0.1875, -0.3125, 0, 0.1875, 0.0625, 0 }, -- Light
}
},
on_timer = function(pos, elapsed)
minetest.set_node(pos, {name = "streets:roadwork_blinking_light_on", param2 = minetest.get_node(pos).param2 })
minetest.set_node(pos, { name = "streets:roadwork_blinking_light_on", param2 = minetest.get_node(pos).param2 })
end,
on_construct = function(pos)
timer = minetest.get_node_timer(pos)
@ -182,19 +182,19 @@ minetest.register_node("streets:roadwork_blinking_light_on", {
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
tiles = {"streets_roadwork_blinking_light_top.png", "streets_roadwork_blinking_light_top.png", "streets_roadwork_blinking_light_on.png"},
tiles = { "streets_roadwork_blinking_light_top.png", "streets_roadwork_blinking_light_top.png", "streets_roadwork_blinking_light_on.png" },
sunlight_propagates = true,
groups = {cracky = 1, not_in_creative_inventory = 1},
groups = { cracky = 1, not_in_creative_inventory = 1 },
node_box = {
type = "fixed",
fixed = {
{-0.1875, -0.5, -0.125, 0.1875, -0.3125, 0.125}, -- Base
{-0.1875, -0.3125, 0, 0.1875, 0.0625, 0}, -- Light
{ -0.1875, -0.5, -0.125, 0.1875, -0.3125, 0.125 }, -- Base
{ -0.1875, -0.3125, 0, 0.1875, 0.0625, 0 }, -- Light
}
},
light_source = 12,
on_timer = function(pos, elapsed)
minetest.set_node(pos, {name = "streets:roadwork_blinking_light_off", param2 = minetest.get_node(pos).param2 })
minetest.set_node(pos, { name = "streets:roadwork_blinking_light_off", param2 = minetest.get_node(pos).param2 })
end,
on_construct = function(pos)
timer = minetest.get_node_timer(pos)
@ -206,8 +206,8 @@ minetest.register_node("streets:roadwork_blinking_light_on", {
minetest.register_craft({
output = "streets:roadwork_blinking_light_off 2",
recipe = {
{"dye:red", "default:torch", "dye:red"},
{"dye:yellow", "default:steel_ingot", "dye:yellow"},
{ "dye:red", "default:torch", "dye:red" },
{ "dye:yellow", "default:steel_ingot", "dye:yellow" },
}
})
@ -238,17 +238,17 @@ minetest.register_node("streets:roadwork_delineator_top", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 1, not_in_creative_inventory = 1},
groups = { cracky = 1, not_in_creative_inventory = 1 },
light_source = 5,
node_box = {
type = "fixed",
fixed = {
{-1/4, -1/2, 0, 1/4, 0, 0}
{ -1 / 4, -1 / 2, 0, 1 / 4, 0, 0 }
}
},
selection_box = {
type = "fixed",
fixed = {0, 0, 0, 0, 0, 0}
fixed = { 0, 0, 0, 0, 0, 0 }
}
})
@ -267,24 +267,24 @@ minetest.register_node("streets:roadwork_delineator_bottom", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 1},
groups = { cracky = 1 },
light_source = 5,
node_box = {
type = "fixed",
fixed = {
{-1/4, -7/32, 0, 1/4, 1/2, 0},
{-1/16, -5/16, -1/16, 1/16, -7/32, 1/16},
{-1/8, -3/8, -1/8, 1/8, -5/16, 1/8},
{-1/4, -1/2, -1/2, 1/4, -3/8, 1/2}
{ -1 / 4, -7 / 32, 0, 1 / 4, 1 / 2, 0 },
{ -1 / 16, -5 / 16, -1 / 16, 1 / 16, -7 / 32, 1 / 16 },
{ -1 / 8, -3 / 8, -1 / 8, 1 / 8, -5 / 16, 1 / 8 },
{ -1 / 4, -1 / 2, -1 / 2, 1 / 4, -3 / 8, 1 / 2 }
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/4, -7/32, 0, 1/4, 1, 0},
{-1/16, -5/16, -1/16, 1/16, -7/32, 1/16},
{-1/8, -3/8, -1/8, 1/8, -5/16, 1/8},
{-1/4, -1/2, -1/2, 1/4, -3/8, 1/2}
{ -1 / 4, -7 / 32, 0, 1 / 4, 1, 0 },
{ -1 / 16, -5 / 16, -1 / 16, 1 / 16, -7 / 32, 1 / 16 },
{ -1 / 8, -3 / 8, -1 / 8, 1 / 8, -5 / 16, 1 / 8 },
{ -1 / 4, -1 / 2, -1 / 2, 1 / 4, -3 / 8, 1 / 2 }
}
},
after_place_node = function(pos)
@ -306,9 +306,9 @@ minetest.register_alias("streets:roadwork_delineator", "streets:roadwork_delinea
minetest.register_craft({
output = "streets:roadwork_delineator 5",
recipe = {
{"dye:red", "default:steel_ingot", "dye:red"},
{"dye:white", "default:steel_ingot", "dye:white"},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{ "dye:red", "default:steel_ingot", "dye:red" },
{ "dye:white", "default:steel_ingot", "dye:white" },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
}
})
@ -326,10 +326,10 @@ minetest.register_node("streets:roadwork_delineator_light_off_top", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 1, not_in_creative_inventory = 1},
groups = { cracky = 1, not_in_creative_inventory = 1 },
light_source = 5,
on_timer = function(pos, elapsed)
minetest.set_node(pos, {name = "streets:roadwork_delineator_light_on_top", param2 = minetest.get_node(pos).param2 })
minetest.set_node(pos, { name = "streets:roadwork_delineator_light_on_top", param2 = minetest.get_node(pos).param2 })
end,
on_construct = function(pos)
timer = minetest.get_node_timer(pos)
@ -338,12 +338,12 @@ minetest.register_node("streets:roadwork_delineator_light_off_top", {
node_box = {
type = "fixed",
fixed = {
{-1/4, -1/2, 0, 1/4, 3/8, 0}
{ -1 / 4, -1 / 2, 0, 1 / 4, 3 / 8, 0 }
}
},
selection_box = {
type = "fixed",
fixed = {0, 0, 0, 0, 0, 0}
fixed = { 0, 0, 0, 0, 0, 0 }
}
})
@ -359,10 +359,10 @@ minetest.register_node("streets:roadwork_delineator_light_on_top", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 1, not_in_creative_inventory = 1},
groups = { cracky = 1, not_in_creative_inventory = 1 },
light_source = 12,
on_timer = function(pos, elapsed)
minetest.set_node(pos, {name = "streets:roadwork_delineator_light_off_top", param2 = minetest.get_node(pos).param2 })
minetest.set_node(pos, { name = "streets:roadwork_delineator_light_off_top", param2 = minetest.get_node(pos).param2 })
end,
on_construct = function(pos)
timer = minetest.get_node_timer(pos)
@ -372,12 +372,12 @@ minetest.register_node("streets:roadwork_delineator_light_on_top", {
node_box = {
type = "fixed",
fixed = {
{-1/4, -1/2, 0, 1/4, 3/8, 0}
{ -1 / 4, -1 / 2, 0, 1 / 4, 3 / 8, 0 }
}
},
selection_box = {
type = "fixed",
fixed = {0, 0, 0, 0, 0, 0}
fixed = { 0, 0, 0, 0, 0, 0 }
}
})
@ -396,24 +396,24 @@ minetest.register_node("streets:roadwork_delineator_light_bottom", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 1},
groups = { cracky = 1 },
light_source = 5,
node_box = {
type = "fixed",
fixed = {
{-1/4, -7/32, 0, 1/4, 1/2, 0},
{-1/16, -5/16, -1/16, 1/16, -7/32, 1/16},
{-1/8, -3/8, -1/8, 1/8, -5/16, 1/8},
{-1/4, -1/2, -1/2, 1/4, -3/8, 1/2}
{ -1 / 4, -7 / 32, 0, 1 / 4, 1 / 2, 0 },
{ -1 / 16, -5 / 16, -1 / 16, 1 / 16, -7 / 32, 1 / 16 },
{ -1 / 8, -3 / 8, -1 / 8, 1 / 8, -5 / 16, 1 / 8 },
{ -1 / 4, -1 / 2, -1 / 2, 1 / 4, -3 / 8, 1 / 2 }
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/4, -7/32, 0, 1/4, 11/8, 0},
{-1/16, -5/16, -1/16, 1/16, -7/32, 1/16},
{-1/8, -3/8, -1/8, 1/8, -5/16, 1/8},
{-1/4, -1/2, -1/2, 1/4, -3/8, 1/2}
{ -1 / 4, -7 / 32, 0, 1 / 4, 11 / 8, 0 },
{ -1 / 16, -5 / 16, -1 / 16, 1 / 16, -7 / 32, 1 / 16 },
{ -1 / 8, -3 / 8, -1 / 8, 1 / 8, -5 / 16, 1 / 8 },
{ -1 / 4, -1 / 2, -1 / 2, 1 / 4, -3 / 8, 1 / 2 }
}
},
after_place_node = function(pos)
@ -435,7 +435,7 @@ minetest.register_alias("streets:roadwork_delineator_light", "streets:roadwork_d
minetest.register_craft({
output = "streets:roadwork_delineator_light",
recipe = {
{"streets:roadwork_blinking_light_off"},
{"streets:roadwork_delineator"}
{ "streets:roadwork_blinking_light_off" },
{ "streets:roadwork_delineator" }
}
})

View File

@ -10,7 +10,7 @@ local function play_bell(pos)
local pos_hash = minetest.hash_node_position(pos)
if not streets.rrxing_sound_handles[pos_hash] then
streets.rrxing_sound_handles[pos_hash] = minetest.sound_play("streets_rrxing_bell",
{pos = pos, gain = 0.66, loop = true, max_hear_distance = 20,})
{ pos = pos, gain = 0.66, loop = true, max_hear_distance = 20, })
end
end
@ -50,21 +50,21 @@ end
local function lights_on(pos)
local node = minetest.get_node(pos)
local param2 = node.param2
minetest.swap_node(pos, {name = "streets:rrxing_middle_center_on", param2 = node.param2})
minetest.swap_node(pos, { name = "streets:rrxing_middle_center_on", param2 = node.param2 })
left_light_direction(pos, param2)
minetest.swap_node(pos, {name = "streets:rrxing_middle_left_on", param2 = node.param2})
minetest.swap_node(pos, { name = "streets:rrxing_middle_left_on", param2 = node.param2 })
right_light_direction(pos, param2)
minetest.swap_node(pos, {name = "streets:rrxing_middle_right_on", param2 = node.param2})
minetest.swap_node(pos, { name = "streets:rrxing_middle_right_on", param2 = node.param2 })
end
local function lights_off(pos)
local node = minetest.get_node(pos)
local param2 = node.param2
minetest.swap_node(pos, {name = "streets:rrxing_middle_center_off", param2 = node.param2})
minetest.swap_node(pos, { name = "streets:rrxing_middle_center_off", param2 = node.param2 })
left_light_direction(pos, param2)
minetest.swap_node(pos, {name = "streets:rrxing_middle_left_off", param2 = node.param2})
minetest.swap_node(pos, { name = "streets:rrxing_middle_left_off", param2 = node.param2 })
right_light_direction(pos, param2)
minetest.swap_node(pos, {name = "streets:rrxing_middle_right_off", param2 = node.param2})
minetest.swap_node(pos, { name = "streets:rrxing_middle_right_off", param2 = node.param2 })
end
local function toggle_lights(pos)
@ -92,20 +92,20 @@ minetest.register_node("streets:rrxing_top", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 3, not_in_creative_inventory = 1},
groups = { cracky = 3, not_in_creative_inventory = 1 },
node_box = {
type = "fixed",
fixed = {
{-1/16, -1/2, -1/16, 1/16, 0, 1/16},
{-1/8, 0, -1/8, 1/8, 3/8, 1/8},
{-1/4, 1/8, -1/4, 1/4, 1/4, 1/4},
{-1/2, -1/2, -1/16, 1/2, 0, -1/16},
{-1/8, -1/2, -1/16, 1/8, -1/4, 1/8}
{ -1 / 16, -1 / 2, -1 / 16, 1 / 16, 0, 1 / 16 },
{ -1 / 8, 0, -1 / 8, 1 / 8, 3 / 8, 1 / 8 },
{ -1 / 4, 1 / 8, -1 / 4, 1 / 4, 1 / 4, 1 / 4 },
{ -1 / 2, -1 / 2, -1 / 16, 1 / 2, 0, -1 / 16 },
{ -1 / 8, -1 / 2, -1 / 16, 1 / 8, -1 / 4, 1 / 8 }
}
},
selection_box = {
type = "fixed",
fixed = {0, 0, 0, 0, 0, 0}
fixed = { 0, 0, 0, 0, 0, 0 }
}
})
@ -116,25 +116,25 @@ minetest.register_node("streets:rrxing_middle_right_on", {
"streets_tl_bg.png",
"streets_tl_bg.png",
"streets_rrxing_middle_right_back.png",
{name="streets_rrxing_middle_right_on.png",animation={type="vertical_frames", aspect_w=64, aspect_h=64, length=1.2}}
{ name = "streets_rrxing_middle_right_on.png", animation = { type = "vertical_frames", aspect_w = 64, aspect_h = 64, length = 1.2 } }
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {not_in_creative_inventory = 1},
groups = { not_in_creative_inventory = 1 },
light_source = 12,
node_box = {
type = "fixed",
fixed = {
{-1/2, -1/2, -1/16, -1/4, 1/2, -1/16},
{-1/2, -5/16, -1/16, -7/16, 1/16, 3/16},
{-1/2, 1/32, -5/16, -15/32, 3/32, -1/16},
{-15/32, -1/8, -3/16, -13/32, 1/32, -1/16}
{ -1 / 2, -1 / 2, -1 / 16, -1 / 4, 1 / 2, -1 / 16 },
{ -1 / 2, -5 / 16, -1 / 16, -7 / 16, 1 / 16, 3 / 16 },
{ -1 / 2, 1 / 32, -5 / 16, -15 / 32, 3 / 32, -1 / 16 },
{ -15 / 32, -1 / 8, -3 / 16, -13 / 32, 1 / 32, -1 / 16 }
}
},
selection_box = {
type = "fixed",
fixed = {0, 0, 0, 0, 0, 0}
fixed = { 0, 0, 0, 0, 0, 0 }
}
})
@ -150,19 +150,19 @@ minetest.register_node("streets:rrxing_middle_right_off", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {not_in_creative_inventory = 1},
groups = { not_in_creative_inventory = 1 },
node_box = {
type = "fixed",
fixed = {
{-1/2, -1/2, -1/16, -1/4, 1/2, -1/16},
{-1/2, -5/16, -1/16, -7/16, 1/16, 3/16},
{-1/2, 1/32, -5/16, -15/32, 3/32, -1/16},
{-15/32, -1/8, -3/16, -13/32, 1/32, -1/16}
{ -1 / 2, -1 / 2, -1 / 16, -1 / 4, 1 / 2, -1 / 16 },
{ -1 / 2, -5 / 16, -1 / 16, -7 / 16, 1 / 16, 3 / 16 },
{ -1 / 2, 1 / 32, -5 / 16, -15 / 32, 3 / 32, -1 / 16 },
{ -15 / 32, -1 / 8, -3 / 16, -13 / 32, 1 / 32, -1 / 16 }
}
},
selection_box = {
type = "fixed",
fixed = {0, 0, 0, 0, 0, 0}
fixed = { 0, 0, 0, 0, 0, 0 }
}
})
@ -173,25 +173,25 @@ minetest.register_node("streets:rrxing_middle_left_on", {
"streets_tl_bg.png",
"streets_tl_bg.png",
"streets_rrxing_middle_left_back.png",
{name="streets_rrxing_middle_left_on.png",animation={type="vertical_frames", aspect_w=64, aspect_h=64, length=1.2}}
{ name = "streets_rrxing_middle_left_on.png", animation = { type = "vertical_frames", aspect_w = 64, aspect_h = 64, length = 1.2 } }
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
light_source = 12,
groups = {not_in_creative_inventory = 1},
groups = { not_in_creative_inventory = 1 },
node_box = {
type = "fixed",
fixed = {
{1/4, -1/2, -1/16, 1/2, 1/2, -1/16},
{7/16, -5/16, -1/16, 1/2, 1/16, 3/16},
{15/32, 1/32, -5/16, 1/2, 3/32, -1/16},
{13/32, -1/8, -3/16, 15/32, 1/32, -1/16}
{ 1 / 4, -1 / 2, -1 / 16, 1 / 2, 1 / 2, -1 / 16 },
{ 7 / 16, -5 / 16, -1 / 16, 1 / 2, 1 / 16, 3 / 16 },
{ 15 / 32, 1 / 32, -5 / 16, 1 / 2, 3 / 32, -1 / 16 },
{ 13 / 32, -1 / 8, -3 / 16, 15 / 32, 1 / 32, -1 / 16 }
}
},
selection_box = {
type = "fixed",
fixed = {0, 0, 0, 0, 0, 0}
fixed = { 0, 0, 0, 0, 0, 0 }
}
})
@ -207,19 +207,19 @@ minetest.register_node("streets:rrxing_middle_left_off", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {not_in_creative_inventory = 1},
groups = { not_in_creative_inventory = 1 },
node_box = {
type = "fixed",
fixed = {
{1/4, -1/2, -1/16, 1/2, 1/2, -1/16},
{7/16, -5/16, -1/16, 1/2, 1/16, 3/16},
{15/32, 1/32, -5/16, 1/2, 3/32, -1/16},
{13/32, -1/8, -3/16, 15/32, 1/32, -1/16}
{ 1 / 4, -1 / 2, -1 / 16, 1 / 2, 1 / 2, -1 / 16 },
{ 7 / 16, -5 / 16, -1 / 16, 1 / 2, 1 / 16, 3 / 16 },
{ 15 / 32, 1 / 32, -5 / 16, 1 / 2, 3 / 32, -1 / 16 },
{ 13 / 32, -1 / 8, -3 / 16, 15 / 32, 1 / 32, -1 / 16 }
}
},
selection_box = {
type = "fixed",
fixed = {0, 0, 0, 0, 0, 0}
fixed = { 0, 0, 0, 0, 0, 0 }
}
})
@ -230,30 +230,30 @@ minetest.register_node("streets:rrxing_middle_center_on", {
"streets_rrxing_middle_center_back.png",
"streets_rrxing_middle_center_back.png",
"streets_rrxing_middle_center_back.png",
{name="streets_rrxing_middle_center_on.png",animation={type="vertical_frames", aspect_w=64, aspect_h=64, length=1.2}}
{ name = "streets_rrxing_middle_center_on.png", animation = { type = "vertical_frames", aspect_w = 64, aspect_h = 64, length = 1.2 } }
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
light_source = 12,
groups = {not_in_creative_inventory = 1},
groups = { not_in_creative_inventory = 1 },
node_box = {
type = "fixed",
fixed = {
{-1/16, -1/2, -1/16, 1/16, 1/2, 1/16},
{-1/2, -1/2, -1/16, 1/2, 1/2, -1/16},
{-1/2, -5/16, -1/16, -3/16, 1/16, 3/16},
{3/16, -5/16, -1/16, 1/2, 1/16, 3/16},
{-3/16, -3/16, -1/16, 3/16, -1/16, 1/8},
{-1/2, 1/32, -5/16, -7/32, 3/32, -1/16},
{-7/32, -1/8, -3/16, -5/32, 1/32, -1/16},
{7/32, 1/32, -5/16, 1/2, 3/32, -1/16},
{5/32, -1/8, -3/16, 7/32, 1/32, -1/16}
{ -1 / 16, -1 / 2, -1 / 16, 1 / 16, 1 / 2, 1 / 16 },
{ -1 / 2, -1 / 2, -1 / 16, 1 / 2, 1 / 2, -1 / 16 },
{ -1 / 2, -5 / 16, -1 / 16, -3 / 16, 1 / 16, 3 / 16 },
{ 3 / 16, -5 / 16, -1 / 16, 1 / 2, 1 / 16, 3 / 16 },
{ -3 / 16, -3 / 16, -1 / 16, 3 / 16, -1 / 16, 1 / 8 },
{ -1 / 2, 1 / 32, -5 / 16, -7 / 32, 3 / 32, -1 / 16 },
{ -7 / 32, -1 / 8, -3 / 16, -5 / 32, 1 / 32, -1 / 16 },
{ 7 / 32, 1 / 32, -5 / 16, 1 / 2, 3 / 32, -1 / 16 },
{ 5 / 32, -1 / 8, -3 / 16, 7 / 32, 1 / 32, -1 / 16 }
}
},
selection_box = {
type = "fixed",
fixed = {0, 0, 0, 0, 0, 0}
fixed = { 0, 0, 0, 0, 0, 0 }
}
})
@ -270,24 +270,24 @@ minetest.register_node("streets:rrxing_middle_center_off", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {not_in_creative_inventory = 1},
groups = { not_in_creative_inventory = 1 },
node_box = {
type = "fixed",
fixed = {
{-1/16, -1/2, -1/16, 1/16, 1/2, 1/16},
{-1/2, -1/2, -1/16, 1/2, 1/2, -1/16},
{-1/2, -5/16, -1/16, -3/16, 1/16, 3/16},
{3/16, -5/16, -1/16, 1/2, 1/16, 3/16},
{-3/16, -3/16, -1/16, 3/16, -1/16, 1/8},
{-1/2, 1/32, -5/16, -7/32, 3/32, -1/16},
{-7/32, -1/8, -3/16, -5/32, 1/32, -1/16},
{7/32, 1/32, -5/16, 1/2, 3/32, -1/16},
{5/32, -1/8, -3/16, 7/32, 1/32, -1/16}
{ -1 / 16, -1 / 2, -1 / 16, 1 / 16, 1 / 2, 1 / 16 },
{ -1 / 2, -1 / 2, -1 / 16, 1 / 2, 1 / 2, -1 / 16 },
{ -1 / 2, -5 / 16, -1 / 16, -3 / 16, 1 / 16, 3 / 16 },
{ 3 / 16, -5 / 16, -1 / 16, 1 / 2, 1 / 16, 3 / 16 },
{ -3 / 16, -3 / 16, -1 / 16, 3 / 16, -1 / 16, 1 / 8 },
{ -1 / 2, 1 / 32, -5 / 16, -7 / 32, 3 / 32, -1 / 16 },
{ -7 / 32, -1 / 8, -3 / 16, -5 / 32, 1 / 32, -1 / 16 },
{ 7 / 32, 1 / 32, -5 / 16, 1 / 2, 3 / 32, -1 / 16 },
{ 5 / 32, -1 / 8, -3 / 16, 7 / 32, 1 / 32, -1 / 16 }
}
},
selection_box = {
type = "fixed",
fixed = {0, 0, 0, 0, 0, 0}
fixed = { 0, 0, 0, 0, 0, 0 }
}
})
@ -303,18 +303,18 @@ minetest.register_node("streets:rrxing_middle", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 3, not_in_creative_inventory = 1},
groups = { cracky = 3, not_in_creative_inventory = 1 },
node_box = {
type = "fixed",
fixed = {
{-1/16, -1/2, -1/16, 1/16, 1/2, 1/16},
{-3/8, -3/8, -1/8, 3/8, 3/8, -1/16},
{-1/8, -1/8, -1/16, 1/8, 1/8, 1/8}
{ -1 / 16, -1 / 2, -1 / 16, 1 / 16, 1 / 2, 1 / 16 },
{ -3 / 8, -3 / 8, -1 / 8, 3 / 8, 3 / 8, -1 / 16 },
{ -1 / 8, -1 / 8, -1 / 16, 1 / 8, 1 / 8, 1 / 8 }
}
},
selection_box = {
type = "fixed",
fixed = {0, 0, 0, 0, 0, 0}
fixed = { 0, 0, 0, 0, 0, 0 }
}
})
@ -333,48 +333,47 @@ minetest.register_node("streets:rrxing_bottom", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 3},
groups = { cracky = 3 },
node_box = {
type = "fixed",
fixed = {
{-1/16, 0, -1/16, 1/16, 1/2, 1/16},
{-1/2, -1/2, -1/4, 1/2, -3/8, 1/4},
{-1/4, -1/2, -1/2, 1/4, -3/8, 1/2},
{-1/8, -3/8, -1/8, 1/8, 0, 1/8}
{ -1 / 16, 0, -1 / 16, 1 / 16, 1 / 2, 1 / 16 },
{ -1 / 2, -1 / 2, -1 / 4, 1 / 2, -3 / 8, 1 / 4 },
{ -1 / 4, -1 / 2, -1 / 2, 1 / 4, -3 / 8, 1 / 2 },
{ -1 / 8, -3 / 8, -1 / 8, 1 / 8, 0, 1 / 8 }
}
},
selection_box = {
type = "fixed",
fixed = {
-- top
{-1/8, 0 + 3, -1/8, 1/8, 3/8 + 3, 1/8},
{-1/4, 1/8 + 3, -1/4, 1/4, 1/4 + 3, 1/4},
{-1/8, -1/2 + 3, -1/16 + 0.01, 1/8, -1/4 + 3, 1/8},
-- middle center, left and right
{-9/16, -5/16 + 2, -1/16, -3/16, 1/16 + 2, 3/16},
{3/16, -5/16 + 2, -1/16, 9/16, 1/16 + 2, 3/16},
-- top
{ -1 / 8, 0 + 3, -1 / 8, 1 / 8, 3 / 8 + 3, 1 / 8 },
{ -1 / 4, 1 / 8 + 3, -1 / 4, 1 / 4, 1 / 4 + 3, 1 / 4 },
{ -1 / 8, -1 / 2 + 3, -1 / 16 + 0.01, 1 / 8, -1 / 4 + 3, 1 / 8 },
-- middle center, left and right
{ -9 / 16, -5 / 16 + 2, -1 / 16, -3 / 16, 1 / 16 + 2, 3 / 16 },
{ 3 / 16, -5 / 16 + 2, -1 / 16, 9 / 16, 1 / 16 + 2, 3 / 16 },
{-3/16, -3/16 + 2, -1/16 + 0.01, 3/16, -1/16 + 2, 1/8},
{ -3 / 16, -3 / 16 + 2, -1 / 16 + 0.01, 3 / 16, -1 / 16 + 2, 1 / 8 },
{-1/2, 1/32 + 2, -5/16, -7/32, 3/32 + 2, -1/16 - 0.01},
{-7/32, -1/8 + 2, -3/16, -5/32, 1/32 + 2, -1/16 - 0.01},
{13/32 - 1, -1/8 + 2, -3/16, 15/32 - 1, 1/32 + 2, -1/16 - 0.01},
{ -1 / 2, 1 / 32 + 2, -5 / 16, -7 / 32, 3 / 32 + 2, -1 / 16 - 0.01 },
{ -7 / 32, -1 / 8 + 2, -3 / 16, -5 / 32, 1 / 32 + 2, -1 / 16 - 0.01 },
{ 13 / 32 - 1, -1 / 8 + 2, -3 / 16, 15 / 32 - 1, 1 / 32 + 2, -1 / 16 - 0.01 },
{7/32, 1/32 + 2, -5/16, 1/2, 3/32 + 2, -1/16 - 0.01},
{5/32, -1/8 + 2, -3/16, 7/32, 1/32 + 2, -1/16 - 0.01},
{-15/32 + 1, -1/8 + 2, -3/16, -13/32 + 1, 1/32 + 2, -1/16 - 0.01},
-- middle
{-3/8, -3/8 + 1, -1/8, 3/8, 3/8 + 1, -1/16},
{-1/8, -1/8 + 1, -1/16, 1/8, 1/8 + 1, 1/8},
-- bottom
{-1/2, -1/2, -1/4, 1/2, -3/8, 1/4},
{-1/4, -1/2, -1/2, 1/4, -3/8, 1/2},
{-1/8, -3/8, -1/8, 1/8, 0, 1/8},
-- post
{-1/16, 0, -1/16, 1/16, 3, 1/16}
{ 7 / 32, 1 / 32 + 2, -5 / 16, 1 / 2, 3 / 32 + 2, -1 / 16 - 0.01 },
{ 5 / 32, -1 / 8 + 2, -3 / 16, 7 / 32, 1 / 32 + 2, -1 / 16 - 0.01 },
{ -15 / 32 + 1, -1 / 8 + 2, -3 / 16, -13 / 32 + 1, 1 / 32 + 2, -1 / 16 - 0.01 },
-- middle
{ -3 / 8, -3 / 8 + 1, -1 / 8, 3 / 8, 3 / 8 + 1, -1 / 16 },
{ -1 / 8, -1 / 8 + 1, -1 / 16, 1 / 8, 1 / 8 + 1, 1 / 8 },
-- bottom
{ -1 / 2, -1 / 2, -1 / 4, 1 / 2, -3 / 8, 1 / 4 },
{ -1 / 4, -1 / 2, -1 / 2, 1 / 4, -3 / 8, 1 / 2 },
{ -1 / 8, -3 / 8, -1 / 8, 1 / 8, 0, 1 / 8 },
-- post
{ -1 / 16, 0, -1 / 16, 1 / 16, 3, 1 / 16 }
}
},
on_construct = function(pos)
local node = minetest.get_node(pos)
local param2 = node.param2
@ -402,13 +401,12 @@ minetest.register_node("streets:rrxing_bottom", {
node.name = "streets:rrxing_middle_right_off"
minetest.set_node(pos, node)
end,
on_destruct = function(pos)
local node = minetest.get_node(pos)
local param2 = node.param2
pos.y=pos.y+2
pos.y = pos.y + 2
stop_bell(pos, node)
pos.y=pos.y-2
pos.y = pos.y - 2
for i = 1, 3 do
pos.y = pos.y + 1
@ -423,17 +421,14 @@ minetest.register_node("streets:rrxing_bottom", {
right_light_direction(pos, param2)
minetest.remove_node(pos)
end,
on_punch = function(pos, node)
toggle_lights(pos, node)
end,
on_receive_fields = function(pos, formname, fields, sender)
if (fields.channel) then
minetest.get_meta(pos):set_string("channel", fields.channel)
end
end,
digiline = {
receptor = {},
effector = {
@ -442,17 +437,17 @@ minetest.register_node("streets:rrxing_bottom", {
if setchan ~= channel then
return
end
if (msg=="bell_on") then
pos.y = pos.y+2
if (msg == "bell_on") then
pos.y = pos.y + 2
play_bell(pos)
elseif (msg=="bell_off") then
pos.y = pos.y+2
elseif (msg == "bell_off") then
pos.y = pos.y + 2
stop_bell(pos)
elseif (msg=="lights_on") then
pos.y = pos.y+2
elseif (msg == "lights_on") then
pos.y = pos.y + 2
lights_on(pos)
elseif (msg=="lights_off") then
pos.y = pos.y+2
elseif (msg == "lights_off") then
pos.y = pos.y + 2
lights_off(pos)
end
end
@ -481,76 +476,76 @@ local function move_arm(pos)
})
if node.name == "streets:rrgate_mech_down" then
minetest.set_node(pos, {name = "streets:rrgate_mech_up", param2 = node.param2})
minetest.set_node(pos, { name = "streets:rrgate_mech_up", param2 = node.param2 })
if dir == "x+" then
for i = 1, 10 do
pos.x = pos.x + 1
if (string.match(minetest.get_node(pos).name, "streets:rrgate_lightfirst")
or string.match(minetest.get_node(pos).name, "streets:rrgate_end")
or string.match(minetest.get_node(pos).name, "streets:rrgate_darkfirst")) == nil then
or string.match(minetest.get_node(pos).name, "streets:rrgate_end")
or string.match(minetest.get_node(pos).name, "streets:rrgate_darkfirst")) == nil then
break
end
minetest.set_node(pos,{name="air"})
minetest.set_node(pos, { name = "air" })
node.name = "streets:rrgate_up"
minetest.set_node({x=pos.x-i, y=pos.y+i, z=pos.z}, node)
minetest.set_node({ x = pos.x - i, y = pos.y + i, z = pos.z }, node)
end
elseif dir == "x-" then
for i = 1, 10 do
pos.x = pos.x - 1
if (string.match(minetest.get_node(pos).name, "streets:rrgate_lightfirst")
or string.match(minetest.get_node(pos).name, "streets:rrgate_end")
or string.match(minetest.get_node(pos).name, "streets:rrgate_darkfirst")) == nil then
or string.match(minetest.get_node(pos).name, "streets:rrgate_end")
or string.match(minetest.get_node(pos).name, "streets:rrgate_darkfirst")) == nil then
break
end
minetest.set_node(pos,{name="air"})
minetest.set_node(pos, { name = "air" })
node.name = "streets:rrgate_up"
minetest.set_node({x=pos.x+i, y=pos.y+i, z=pos.z}, node)
minetest.set_node({ x = pos.x + i, y = pos.y + i, z = pos.z }, node)
end
elseif dir == "z+" then
for i = 1, 10 do
pos.z = pos.z + 1
if (string.match(minetest.get_node(pos).name, "streets:rrgate_lightfirst")
or string.match(minetest.get_node(pos).name, "streets:rrgate_end")
or string.match(minetest.get_node(pos).name, "streets:rrgate_darkfirst")) == nil then
or string.match(minetest.get_node(pos).name, "streets:rrgate_end")
or string.match(minetest.get_node(pos).name, "streets:rrgate_darkfirst")) == nil then
break
end
minetest.set_node(pos,{name="air"})
minetest.set_node(pos, { name = "air" })
node.name = "streets:rrgate_up"
minetest.set_node({x=pos.x, y=pos.y+i, z=pos.z-i}, node)
minetest.set_node({ x = pos.x, y = pos.y + i, z = pos.z - i }, node)
end
elseif dir == "z-" then
for i = 1, 10 do
pos.z = pos.z - 1
if (string.match(minetest.get_node(pos).name, "streets:rrgate_lightfirst")
or string.match(minetest.get_node(pos).name, "streets:rrgate_end")
or string.match(minetest.get_node(pos).name, "streets:rrgate_darkfirst")) == nil then
or string.match(minetest.get_node(pos).name, "streets:rrgate_end")
or string.match(minetest.get_node(pos).name, "streets:rrgate_darkfirst")) == nil then
break
end
minetest.set_node(pos,{name="air"})
minetest.set_node(pos, { name = "air" })
node.name = "streets:rrgate_up"
minetest.set_node({x=pos.x, y=pos.y+i, z=pos.z+i}, node)
minetest.set_node({ x = pos.x, y = pos.y + i, z = pos.z + i }, node)
end
end
elseif node.name == "streets:rrgate_mech_up" then
minetest.swap_node(pos, {name = "streets:rrgate_mech_down", param2 = node.param2})
if dir == "x+" then
minetest.swap_node(pos, { name = "streets:rrgate_mech_down", param2 = node.param2 })
if dir == "x+" then
for i = 1, 10 do
pos.y = pos.y + 1
if string.match(minetest.get_node(pos).name, "streets:rrgate_up") == nil then
break
end
minetest.set_node(pos,{name="air"})
minetest.set_node(pos, { name = "air" })
if i % 2 == 1 then
node.name = "streets:rrgate_lightfirst"
else
node.name = "streets:rrgate_darkfirst"
end
if minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z}).name ~= "streets:rrgate_up" then
if minetest.get_node({ x = pos.x, y = pos.y + 1, z = pos.z }).name ~= "streets:rrgate_up" then
node.name = "streets:rrgate_end"
end
minetest.set_node({x=pos.x+i, y=pos.y-i, z=pos.z}, node)
minetest.set_node({ x = pos.x + i, y = pos.y - i, z = pos.z }, node)
end
elseif dir == "x-" then
for i = 1, 10 do
@ -558,16 +553,16 @@ local function move_arm(pos)
if string.match(minetest.get_node(pos).name, "streets:rrgate_up") == nil then
break
end
minetest.set_node(pos,{name="air"})
minetest.set_node(pos, { name = "air" })
if i % 2 == 1 then
node.name = "streets:rrgate_lightfirst"
else
node.name = "streets:rrgate_darkfirst"
end
if minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z}).name ~= "streets:rrgate_up" then
if minetest.get_node({ x = pos.x, y = pos.y + 1, z = pos.z }).name ~= "streets:rrgate_up" then
node.name = "streets:rrgate_end"
end
minetest.set_node({x=pos.x-i, y=pos.y-i, z=pos.z}, node)
minetest.set_node({ x = pos.x - i, y = pos.y - i, z = pos.z }, node)
end
elseif dir == "z+" then
for i = 1, 10 do
@ -575,16 +570,16 @@ local function move_arm(pos)
if string.match(minetest.get_node(pos).name, "streets:rrgate_up") == nil then
break
end
minetest.set_node(pos,{name="air"})
minetest.set_node(pos, { name = "air" })
if i % 2 == 1 then
node.name = "streets:rrgate_lightfirst"
else
node.name = "streets:rrgate_darkfirst"
end
if minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z}).name ~= "streets:rrgate_up" then
if minetest.get_node({ x = pos.x, y = pos.y + 1, z = pos.z }).name ~= "streets:rrgate_up" then
node.name = "streets:rrgate_end"
end
minetest.set_node({x=pos.x, y=pos.y-i, z=pos.z+i}, node)
minetest.set_node({ x = pos.x, y = pos.y - i, z = pos.z + i }, node)
end
elseif dir == "z-" then
for i = 1, 10 do
@ -592,16 +587,16 @@ local function move_arm(pos)
if string.match(minetest.get_node(pos).name, "streets:rrgate_up") == nil then
break
end
minetest.set_node(pos,{name="air"})
minetest.set_node(pos, { name = "air" })
if i % 2 == 1 then
node.name = "streets:rrgate_lightfirst"
else
node.name = "streets:rrgate_darkfirst"
end
if minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z}).name ~= "streets:rrgate_up" then
if minetest.get_node({ x = pos.x, y = pos.y + 1, z = pos.z }).name ~= "streets:rrgate_up" then
node.name = "streets:rrgate_end"
end
minetest.set_node({x=pos.x, y=pos.y-i, z=pos.z-i}, node)
minetest.set_node({ x = pos.x, y = pos.y - i, z = pos.z - i }, node)
end
end
end
@ -619,58 +614,57 @@ minetest.register_node("streets:rrgate_mech_down", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 1},
groups = { cracky = 1 },
node_box = {
type = "fixed",
fixed = {
{-1/4, -1/4, -1/4, 1/4, 1/4, 1/4},
{-1/8, -1/2, -1/8, 1/8, -1/4, 1/8},
{ -1 / 4, -1 / 4, -1 / 4, 1 / 4, 1 / 4, 1 / 4 },
{ -1 / 8, -1 / 2, -1 / 8, 1 / 8, -1 / 4, 1 / 8 },
{-3/8, -1/2, -1/2, -1/4, -1/4, 1/8},
{-3/8, -1/2, -1/8, -1/4, 1/8, 1/8},
{-3/8, -1/8, -1/8, -1/4, 1/8, 1/2},
{-1/2, -3/16, 1/4, -3/8, 3/16, 1/2},
{-1/2, -1/8, 3/16, -3/8, 1/8, 1/2},
{-1/2, -1/16, 1/8, -3/8, 1/16, 1/2},
{ -3 / 8, -1 / 2, -1 / 2, -1 / 4, -1 / 4, 1 / 8 },
{ -3 / 8, -1 / 2, -1 / 8, -1 / 4, 1 / 8, 1 / 8 },
{ -3 / 8, -1 / 8, -1 / 8, -1 / 4, 1 / 8, 1 / 2 },
{ -1 / 2, -3 / 16, 1 / 4, -3 / 8, 3 / 16, 1 / 2 },
{ -1 / 2, -1 / 8, 3 / 16, -3 / 8, 1 / 8, 1 / 2 },
{ -1 / 2, -1 / 16, 1 / 8, -3 / 8, 1 / 16, 1 / 2 },
{1/4, -1/2, -1/2, 3/8, -1/4, 1/8},
{1/4, -1/2, -1/8, 3/8, 1/8, 1/8},
{1/4, -1/8, -1/8, 3/8, 1/8, 1/2},
{3/8, -3/16, 1/4, 1/2, 3/16, 1/2},
{3/8, -1/8, 3/16, 1/2, 1/8, 1/2},
{3/8, -1/16, 1/8, 1/2, 1/16, 1/2},
{ 1 / 4, -1 / 2, -1 / 2, 3 / 8, -1 / 4, 1 / 8 },
{ 1 / 4, -1 / 2, -1 / 8, 3 / 8, 1 / 8, 1 / 8 },
{ 1 / 4, -1 / 8, -1 / 8, 3 / 8, 1 / 8, 1 / 2 },
{ 3 / 8, -3 / 16, 1 / 4, 1 / 2, 3 / 16, 1 / 2 },
{ 3 / 8, -1 / 8, 3 / 16, 1 / 2, 1 / 8, 1 / 2 },
{ 3 / 8, -1 / 16, 1 / 8, 1 / 2, 1 / 16, 1 / 2 },
{-3/8, -1/2, -1/2, 3/8, -1/4, -3/8},
{ -3 / 8, -1 / 2, -1 / 2, 3 / 8, -1 / 4, -3 / 8 },
{-7/16, -1/16, -1/16, 7/16, 1/16, 1/16}
{ -7 / 16, -1 / 16, -1 / 16, 7 / 16, 1 / 16, 1 / 16 }
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/4, -1/4, -1/4, 1/4, 1/4, 1/4},
{-1/8, -1/2, -1/8, 1/8, -1/4, 1/8},
{ -1 / 4, -1 / 4, -1 / 4, 1 / 4, 1 / 4, 1 / 4 },
{ -1 / 8, -1 / 2, -1 / 8, 1 / 8, -1 / 4, 1 / 8 },
{-3/8, -1/2, -1/2, -1/4, -1/4, 1/8},
{-3/8, -1/2, -1/8, -1/4, 1/8, 1/8},
{-3/8, -1/8, -1/8, -1/4, 1/8, 1/2},
{-1/2, -3/16, 1/4, -3/8, 3/16, 1/2},
{-1/2, -1/8, 3/16, -3/8, 1/8, 1/2},
{-1/2, -1/16, 1/8, -3/8, 1/16, 1/2},
{ -3 / 8, -1 / 2, -1 / 2, -1 / 4, -1 / 4, 1 / 8 },
{ -3 / 8, -1 / 2, -1 / 8, -1 / 4, 1 / 8, 1 / 8 },
{ -3 / 8, -1 / 8, -1 / 8, -1 / 4, 1 / 8, 1 / 2 },
{ -1 / 2, -3 / 16, 1 / 4, -3 / 8, 3 / 16, 1 / 2 },
{ -1 / 2, -1 / 8, 3 / 16, -3 / 8, 1 / 8, 1 / 2 },
{ -1 / 2, -1 / 16, 1 / 8, -3 / 8, 1 / 16, 1 / 2 },
{1/4, -1/2, -1/2, 3/8, -1/4, 1/8},
{1/4, -1/2, -1/8, 3/8, 1/8, 1/8},
{1/4, -1/8, -1/8, 3/8, 1/8, 1/2},
{3/8, -3/16, 1/4, 1/2, 3/16, 1/2},
{3/8, -1/8, 3/16, 1/2, 1/8, 1/2},
{3/8, -1/16, 1/8, 1/2, 1/16, 1/2},
{ 1 / 4, -1 / 2, -1 / 2, 3 / 8, -1 / 4, 1 / 8 },
{ 1 / 4, -1 / 2, -1 / 8, 3 / 8, 1 / 8, 1 / 8 },
{ 1 / 4, -1 / 8, -1 / 8, 3 / 8, 1 / 8, 1 / 2 },
{ 3 / 8, -3 / 16, 1 / 4, 1 / 2, 3 / 16, 1 / 2 },
{ 3 / 8, -1 / 8, 3 / 16, 1 / 2, 1 / 8, 1 / 2 },
{ 3 / 8, -1 / 16, 1 / 8, 1 / 2, 1 / 16, 1 / 2 },
{-3/8, -1/2, -1/2, 3/8, -1/4, -3/8},
{ -3 / 8, -1 / 2, -1 / 2, 3 / 8, -1 / 4, -3 / 8 },
{-7/16, -1/16, -1/16, 7/16, 1/16, 1/16}
{ -7 / 16, -1 / 16, -1 / 16, 7 / 16, 1 / 16, 1 / 16 }
}
},
after_place_node = function(pos)
local node = minetest.get_node(pos)
node.name = "streets:rrgate_mech_bottom"
@ -679,12 +673,10 @@ minetest.register_node("streets:rrgate_mech_down", {
node.name = "streets:rrgate_mech_down"
minetest.set_node(pos, node)
end,
after_dig_node = function(pos)
pos.y = pos.y - 1
minetest.set_node(pos,{name="air"})
minetest.set_node(pos, { name = "air" })
end,
on_punch = function(pos)
move_arm(pos)
end
@ -701,64 +693,62 @@ minetest.register_node("streets:rrgate_mech_up", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 1,not_in_creative_inventory = 1},
groups = { cracky = 1, not_in_creative_inventory = 1 },
drop = "streets:rrgate_mech_down",
node_box = {
type = "fixed",
fixed = {
{-1/4, -1/4, -1/4, 1/4, 1/4, 1/4},
{-1/8, -1/2, -1/8, 1/8, -1/4, 1/8},
{ -1 / 4, -1 / 4, -1 / 4, 1 / 4, 1 / 4, 1 / 4 },
{ -1 / 8, -1 / 2, -1 / 8, 1 / 8, -1 / 4, 1 / 8 },
{-3/8, -1/8, -1/2, -1/4, 1/2, -1/4},
{-3/8, -1/8, -1/2, -1/4, 1/8, 1/8},
{-3/8, -1/2, -1/8, -1/4, 1/8, 1/8},
{-1/2, -1/2, -3/16, -3/8, -1/4, 3/16},
{-1/2, -1/2, -1/8, -3/8, -3/16, 1/8},
{-1/2, -1/2, -1/16, -3/8, -1/8, 1/16},
{ -3 / 8, -1 / 8, -1 / 2, -1 / 4, 1 / 2, -1 / 4 },
{ -3 / 8, -1 / 8, -1 / 2, -1 / 4, 1 / 8, 1 / 8 },
{ -3 / 8, -1 / 2, -1 / 8, -1 / 4, 1 / 8, 1 / 8 },
{ -1 / 2, -1 / 2, -3 / 16, -3 / 8, -1 / 4, 3 / 16 },
{ -1 / 2, -1 / 2, -1 / 8, -3 / 8, -3 / 16, 1 / 8 },
{ -1 / 2, -1 / 2, -1 / 16, -3 / 8, -1 / 8, 1 / 16 },
{1/4, -1/8, -1/2, 3/8, 1/2, -1/4},
{1/4, -1/8, -1/2, 3/8, 1/8, 1/8},
{1/4, -1/2, -1/8, 3/8, 1/8, 1/8},
{3/8, -1/2, -3/16, 1/2, -1/4, 3/16},
{3/8, -1/2, -1/8, 1/2, -3/16, 1/8},
{3/8, -1/2, -1/16, 1/2, -1/8, 1/16},
{ 1 / 4, -1 / 8, -1 / 2, 3 / 8, 1 / 2, -1 / 4 },
{ 1 / 4, -1 / 8, -1 / 2, 3 / 8, 1 / 8, 1 / 8 },
{ 1 / 4, -1 / 2, -1 / 8, 3 / 8, 1 / 8, 1 / 8 },
{ 3 / 8, -1 / 2, -3 / 16, 1 / 2, -1 / 4, 3 / 16 },
{ 3 / 8, -1 / 2, -1 / 8, 1 / 2, -3 / 16, 1 / 8 },
{ 3 / 8, -1 / 2, -1 / 16, 1 / 2, -1 / 8, 1 / 16 },
{-3/8, 3/8, -1/2, 3/8, 1/2, -1/4},
{ -3 / 8, 3 / 8, -1 / 2, 3 / 8, 1 / 2, -1 / 4 },
{-7/16, -1/16, -1/16, 7/16, 1/16, 1/16}
{ -7 / 16, -1 / 16, -1 / 16, 7 / 16, 1 / 16, 1 / 16 }
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/4, -1/4, -1/4, 1/4, 1/4, 1/4},
{-1/8, -1/2, -1/8, 1/8, -1/4, 1/8},
{ -1 / 4, -1 / 4, -1 / 4, 1 / 4, 1 / 4, 1 / 4 },
{ -1 / 8, -1 / 2, -1 / 8, 1 / 8, -1 / 4, 1 / 8 },
{-3/8, -1/8, -1/2, -1/4, 1/2, -1/4},
{-3/8, -1/8, -1/2, -1/4, 1/8, 1/8},
{-3/8, -1/2, -1/8, -1/4, 1/8, 1/8},
{-1/2, -1/2, -3/16, -3/8, -1/4, 3/16},
{-1/2, -1/2, -1/8, -3/8, -3/16, 1/8},
{-1/2, -1/2, -1/16, -3/8, -1/8, 1/16},
{ -3 / 8, -1 / 8, -1 / 2, -1 / 4, 1 / 2, -1 / 4 },
{ -3 / 8, -1 / 8, -1 / 2, -1 / 4, 1 / 8, 1 / 8 },
{ -3 / 8, -1 / 2, -1 / 8, -1 / 4, 1 / 8, 1 / 8 },
{ -1 / 2, -1 / 2, -3 / 16, -3 / 8, -1 / 4, 3 / 16 },
{ -1 / 2, -1 / 2, -1 / 8, -3 / 8, -3 / 16, 1 / 8 },
{ -1 / 2, -1 / 2, -1 / 16, -3 / 8, -1 / 8, 1 / 16 },
{1/4, -1/8, -1/2, 3/8, 1/2, -1/4},
{1/4, -1/8, -1/2, 3/8, 1/8, 1/8},
{1/4, -1/2, -1/8, 3/8, 1/8, 1/8},
{3/8, -1/2, -3/16, 1/2, -1/4, 3/16},
{3/8, -1/2, -1/8, 1/2, -3/16, 1/8},
{3/8, -1/2, -1/16, 1/2, -1/8, 1/16},
{ 1 / 4, -1 / 8, -1 / 2, 3 / 8, 1 / 2, -1 / 4 },
{ 1 / 4, -1 / 8, -1 / 2, 3 / 8, 1 / 8, 1 / 8 },
{ 1 / 4, -1 / 2, -1 / 8, 3 / 8, 1 / 8, 1 / 8 },
{ 3 / 8, -1 / 2, -3 / 16, 1 / 2, -1 / 4, 3 / 16 },
{ 3 / 8, -1 / 2, -1 / 8, 1 / 2, -3 / 16, 1 / 8 },
{ 3 / 8, -1 / 2, -1 / 16, 1 / 2, -1 / 8, 1 / 16 },
{-3/8, 3/8, -1/2, 3/8, 1/2, -1/4},
{ -3 / 8, 3 / 8, -1 / 2, 3 / 8, 1 / 2, -1 / 4 },
{-7/16, -1/16, -1/16, 7/16, 1/16, 1/16}
{ -7 / 16, -1 / 16, -1 / 16, 7 / 16, 1 / 16, 1 / 16 }
}
},
after_dig_node = function(pos)
pos.y = pos.y - 1
minetest.set_node(pos,{name="air"})
minetest.set_node(pos, { name = "air" })
end,
on_punch = function(pos)
move_arm(pos)
end
@ -776,43 +766,39 @@ minetest.register_node("streets:rrgate_mech_bottom", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 1,not_in_creative_inventory = 1},
groups = { cracky = 1, not_in_creative_inventory = 1 },
drop = "streets:rrgate_mech_down",
node_box = {
type = "fixed",
fixed = {
{-1/16, -1/2, -1/16, 1/16, 1/2, 1/16},
{-1/2, -1/2, -1/4, 1/2, -3/8, 1/4},
{-1/4, -1/2, -1/2, 1/4, -3/8, 1/2},
{-1/8, -1/2, -1/8, 1/8, 0, 1/8}
{ -1 / 16, -1 / 2, -1 / 16, 1 / 16, 1 / 2, 1 / 16 },
{ -1 / 2, -1 / 2, -1 / 4, 1 / 2, -3 / 8, 1 / 4 },
{ -1 / 4, -1 / 2, -1 / 2, 1 / 4, -3 / 8, 1 / 2 },
{ -1 / 8, -1 / 2, -1 / 8, 1 / 8, 0, 1 / 8 }
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/16, -1/2, -1/16, 1/16, 1/2, 1/16},
{-1/2, -1/2, -1/4, 1/2, -3/8, 1/4},
{-1/4, -1/2, -1/2, 1/4, -3/8, 1/2},
{-1/8, -1/2, -1/8, 1/8, 0, 1/8}
{ -1 / 16, -1 / 2, -1 / 16, 1 / 16, 1 / 2, 1 / 16 },
{ -1 / 2, -1 / 2, -1 / 4, 1 / 2, -3 / 8, 1 / 4 },
{ -1 / 4, -1 / 2, -1 / 2, 1 / 4, -3 / 8, 1 / 2 },
{ -1 / 8, -1 / 2, -1 / 8, 1 / 8, 0, 1 / 8 }
}
},
after_dig_node = function(pos)
pos.y = pos.y + 1
minetest.set_node(pos,{name="air"})
minetest.set_node(pos, { name = "air" })
end,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", "field[channel;Channel;${channel}]")
end,
on_receive_fields = function(pos, formname, fields)
if (fields.channel) then
minetest.get_meta(pos):set_string("channel", fields.channel)
end
end,
digiline = {
receptor = {},
effector = {
@ -823,7 +809,7 @@ minetest.register_node("streets:rrgate_mech_bottom", {
end
pos.y = pos.y + 1
local mechnode = minetest.get_node(pos)
if ((msg == "up" and mechnode.name=="streets:rrgate_mech_down") or (msg == "down" and mechnode.name=="streets:rrgate_mech_up")) then
if ((msg == "up" and mechnode.name == "streets:rrgate_mech_down") or (msg == "down" and mechnode.name == "streets:rrgate_mech_up")) then
move_arm(pos)
end
end
@ -836,30 +822,30 @@ minetest.register_node("streets:rrgate_lightfirst", {
tiles = {
"streets_rrgate_top.png",
"streets_rrgate_side.png",
{name="streets_rrgate_lightfirst.png",animation={type="vertical_frames", aspect_w=64, aspect_h=64, length=1.2}},
{name="streets_rrgate_lightfirst.png",animation={type="vertical_frames", aspect_w=64, aspect_h=64, length=1.2}},
{ name = "streets_rrgate_lightfirst.png", animation = { type = "vertical_frames", aspect_w = 64, aspect_h = 64, length = 1.2 } },
{ name = "streets_rrgate_lightfirst.png", animation = { type = "vertical_frames", aspect_w = 64, aspect_h = 64, length = 1.2 } },
"streets_rrgate_side.png",
"streets_rrgate_side.png"
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 1},
groups = { cracky = 1 },
light_source = 12,
node_box = {
type = "fixed",
fixed = {
{-1/8, -1/2, -1/2, 1/8, -7/16, 1/2},
{-1/8, -5/16, -1/2, 1/8, -1/4, 1/2},
{-1/8, -1/2, -1/2, -1/16, -1/4, 1/2},
{1/16, -1/2, -1/2, 1/8, -1/4, 1/2},
{0, -1/4, -1/8, 0, 0, 1/8}
{ -1 / 8, -1 / 2, -1 / 2, 1 / 8, -7 / 16, 1 / 2 },
{ -1 / 8, -5 / 16, -1 / 2, 1 / 8, -1 / 4, 1 / 2 },
{ -1 / 8, -1 / 2, -1 / 2, -1 / 16, -1 / 4, 1 / 2 },
{ 1 / 16, -1 / 2, -1 / 2, 1 / 8, -1 / 4, 1 / 2 },
{ 0, -1 / 4, -1 / 8, 0, 0, 1 / 8 }
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/8, -1/2, -1/2, 1/8, -1/4, 1/2}
{ -1 / 8, -1 / 2, -1 / 2, 1 / 8, -1 / 4, 1 / 2 }
}
}
})
@ -868,30 +854,30 @@ minetest.register_node("streets:rrgate_darkfirst", {
tiles = {
"streets_rrgate_top.png",
"streets_rrgate_side.png",
{name="streets_rrgate_darkfirst.png",animation={type="vertical_frames", aspect_w=64, aspect_h=64, length=1.2}},
{name="streets_rrgate_darkfirst.png",animation={type="vertical_frames", aspect_w=64, aspect_h=64, length=1.2}},
{ name = "streets_rrgate_darkfirst.png", animation = { type = "vertical_frames", aspect_w = 64, aspect_h = 64, length = 1.2 } },
{ name = "streets_rrgate_darkfirst.png", animation = { type = "vertical_frames", aspect_w = 64, aspect_h = 64, length = 1.2 } },
"streets_rrgate_side.png",
"streets_rrgate_side.png"
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 1,not_in_creative_inventory = 1},
groups = { cracky = 1, not_in_creative_inventory = 1 },
drop = "streets:rrgate_lightfirst",
node_box = {
type = "fixed",
fixed = {
{-1/8, -1/2, -1/2, 1/8, -7/16, 1/2},
{-1/8, -5/16, -1/2, 1/8, -1/4, 1/2},
{-1/8, -1/2, -1/2, -1/16, -1/4, 1/2},
{1/16, -1/2, -1/2, 1/8, -1/4, 1/2},
{0, -1/4, -1/8, 0, 0, 1/8}
{ -1 / 8, -1 / 2, -1 / 2, 1 / 8, -7 / 16, 1 / 2 },
{ -1 / 8, -5 / 16, -1 / 2, 1 / 8, -1 / 4, 1 / 2 },
{ -1 / 8, -1 / 2, -1 / 2, -1 / 16, -1 / 4, 1 / 2 },
{ 1 / 16, -1 / 2, -1 / 2, 1 / 8, -1 / 4, 1 / 2 },
{ 0, -1 / 4, -1 / 8, 0, 0, 1 / 8 }
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/8, -1/2, -1/2, 1/8, -1/4, 1/2}
{ -1 / 8, -1 / 2, -1 / 2, 1 / 8, -1 / 4, 1 / 2 }
}
}
})
@ -908,22 +894,22 @@ minetest.register_node("streets:rrgate_end", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 1,not_in_creative_inventory = 1},
groups = { cracky = 1, not_in_creative_inventory = 1 },
drop = "streets:rrgate_lightfirst",
node_box = {
type = "fixed",
fixed = {
{-1/8, -1/2, -1/2, 1/8, -7/16, 1/2},
{-1/8, -5/16, -1/2, 1/8, -1/4, 1/2},
{-1/8, -1/2, -1/2, -1/16, -1/4, 1/2},
{1/16, -1/2, -1/2, 1/8, -1/4, 1/2},
{0, -1/4, -1/8, 0, 0, 1/8}
{ -1 / 8, -1 / 2, -1 / 2, 1 / 8, -7 / 16, 1 / 2 },
{ -1 / 8, -5 / 16, -1 / 2, 1 / 8, -1 / 4, 1 / 2 },
{ -1 / 8, -1 / 2, -1 / 2, -1 / 16, -1 / 4, 1 / 2 },
{ 1 / 16, -1 / 2, -1 / 2, 1 / 8, -1 / 4, 1 / 2 },
{ 0, -1 / 4, -1 / 8, 0, 0, 1 / 8 }
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/8, -1/2, -1/2, 1/8, -1/4, 1/2}
{ -1 / 8, -1 / 2, -1 / 2, 1 / 8, -1 / 4, 1 / 2 }
}
}
})
@ -940,22 +926,22 @@ minetest.register_node("streets:rrgate_up", {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 1,not_in_creative_inventory = 1},
groups = { cracky = 1, not_in_creative_inventory = 1 },
drop = "streets:rrgate_lightfirst",
node_box = {
type = "fixed",
fixed = {
{-1/8, -1/2, -1/2, 1/8, 1/2, -7/16},
{-1/8, -1/2, -5/16, 1/8, 1/2, -1/4},
{-1/8, -1/2, -1/2, -1/16, 1/2, -1/4},
{1/16, -1/2, -1/2, 1/8, 1/2, -1/4},
{0, -1/8, -1/4, 0, 1/8, 0}
{ -1 / 8, -1 / 2, -1 / 2, 1 / 8, 1 / 2, -7 / 16 },
{ -1 / 8, -1 / 2, -5 / 16, 1 / 8, 1 / 2, -1 / 4 },
{ -1 / 8, -1 / 2, -1 / 2, -1 / 16, 1 / 2, -1 / 4 },
{ 1 / 16, -1 / 2, -1 / 2, 1 / 8, 1 / 2, -1 / 4 },
{ 0, -1 / 8, -1 / 4, 0, 1 / 8, 0 }
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/8, -1/2, -1/2, 1/8, 1/2, -1/4}
{ -1 / 8, -1 / 2, -1 / 2, 1 / 8, 1 / 2, -1 / 4 }
}
}
})
@ -963,26 +949,26 @@ minetest.register_node("streets:rrgate_up", {
minetest.register_craft({
output = "streets:rrxing_bottom",
recipe = {
{"","default:copper_ingot",""},
{"wool:red","default:sign_wall_wood","wool:red"},
{"default:steel_ingot","default:steel_ingot","default:steel_ingot"}
{ "", "default:copper_ingot", "" },
{ "wool:red", "default:sign_wall_wood", "wool:red" },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
}
})
minetest.register_craft({
output = "streets:rrgate_mech_down",
recipe = {
{"","default:copper_ingot","streets:rrgate_lightfirst"},
{"","default:steel_ingot",""},
{"default:steel_ingot","default:steel_ingot","default:steel_ingot"}
{ "", "default:copper_ingot", "streets:rrgate_lightfirst" },
{ "", "default:steel_ingot", "" },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
}
})
minetest.register_craft({
output = "streets:rrgate_lightfirst 4",
recipe = {
{"default:steel_ingot","default:torch","default:steel_ingot"},
{"dye:red","dye:white","dye:red"},
{"default:steel_ingot","default:steel_ingot","default:steel_ingot"}
{ "default:steel_ingot", "default:torch", "default:steel_ingot" },
{ "dye:red", "dye:white", "dye:red" },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
}
})

View File

@ -36,6 +36,12 @@ streets.register_road_sign({
thickness = 0.05
})
minetest.register_craft({
type = "shapeless",
output = "streets:sign_blank",
recipe = { "streets:asphalt", "default:sign_wall_wood" },
})
streets.register_road_sign({
name = "sign_curve_chevron_right",
friendlyname = "Curve Chevron Sign (Right)",

View File

@ -13,11 +13,11 @@ function streets.signworkshop.start(pos)
end
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local template = inv:get_stack("template",1):get_name()
local template = inv:get_stack("template", 1):get_name()
if not (template and template ~= "") then
return
end
local surface = inv:get_stack("surface",1):get_name()
local surface = inv:get_stack("surface", 1):get_name()
if not (surface and surface ~= "") then
return
end
@ -26,20 +26,20 @@ function streets.signworkshop.start(pos)
return
end
local dye_level_ok = true
for k,v in pairs(dyes_needed) do
dye_level_ok = dye_level_ok and inv:contains_item("dye",{name = "dye:"..k,count = v})
for k, v in pairs(dyes_needed) do
dye_level_ok = dye_level_ok and inv:contains_item("dye", { name = "dye:" .. k, count = v })
end
if not dye_level_ok then
return
end
if not inv:room_for_item("output",{name = template,count = 1}) then
if not inv:room_for_item("output", { name = template, count = 1 }) then
return
end
meta:set_string("working_on",template)
meta:set_int("progress",0)
inv:remove_item("surface",{name = inv:get_stack("surface",1):get_name(),count = 1})
for k,v in pairs(dyes_needed) do
inv:remove_item("dye",{name = "dye:"..k,count = v})
meta:set_string("working_on", template)
meta:set_int("progress", 0)
inv:remove_item("surface", { name = inv:get_stack("surface", 1):get_name(), count = 1 })
for k, v in pairs(dyes_needed) do
inv:remove_item("dye", { name = "dye:" .. k, count = v })
end
streets.signworkshop.step(pos)
end
@ -57,16 +57,16 @@ function streets.signworkshop.step(pos)
local progress = meta:get_int("progress")
progress = progress + 1
if progress < 10 then
minetest.after(0.2,streets.signworkshop.step,pos)
minetest.after(0.2, streets.signworkshop.step, pos)
else
meta:set_int("progress",0)
meta:set_int("progress", 0)
progress = 0
inv:add_item("output",meta:get_string("working_on"))
meta:set_string("working_on","")
inv:add_item("output", meta:get_string("working_on"))
meta:set_string("working_on", "")
streets.signworkshop.start(pos)
end
meta:set_int("progress",progress)
streets.signworkshop.update_formspec(pos)
meta:set_int("progress", progress)
streets.signworkshop.update_formspec(pos)
end
function streets.signworkshop.update_formspec(pos)
@ -82,7 +82,7 @@ function streets.signworkshop.update_formspec(pos)
elseif page > maxpage then
page = 1
end
meta:set_int("page",page)
meta:set_int("page", page)
local fs = "size[9,9;]"
fs = fs .. "tabheader[0,0;tabs;"
fs = fs .. minetest.formspec_escape("Dye Storage") .. ","
@ -96,10 +96,10 @@ function streets.signworkshop.update_formspec(pos)
elseif meta:get_int("tab") == 2 then
local x_pos = 0.5
local y_pos = 0
for k,v in pairs(streets.signs.sections) do
for k, v in pairs(streets.signs.sections) do
fs = fs .. "button[" .. x_pos .. "," .. y_pos .. ";2.5,1;"
fs = fs..minetest.formspec_escape(v.name) .. ";"
fs = fs..minetest.formspec_escape(v.friendlyname) .. "]"
fs = fs .. minetest.formspec_escape(v.name) .. ";"
fs = fs .. minetest.formspec_escape(v.friendlyname) .. "]"
y_pos = y_pos + 0.8
if y_pos > 4 then
y_pos = 0
@ -109,18 +109,18 @@ function streets.signworkshop.update_formspec(pos)
elseif meta:get_int("tab") == 3 then
fs = fs .. "label[0,0;Dyes Needed]"
fs = fs .. "list[context;dye_needed;0,0.5;2,3]"
fs = fs .. "list[context;list;2.25,0;4,4;"..tostring((page-1)*16).."]" --Each page is a 4x4 grid (16 items)
fs = fs .. "list[context;list;2.25,0;4,4;" .. tostring((page - 1) * 16) .. "]" --Each page is a 4x4 grid (16 items)
fs = fs .. "label[6.5,0.5;Blank Sign]"
fs = fs .. "label[7.5,0.5;Template]"
fs = fs .. "list[context;surface;6.5,1;1,1]"
fs = fs .. "list[context;template;7.5,1;1,1]"
fs = fs .. "image[7,2;1,1;gui_furnace_arrow_bg.png^[lowpart:" .. meta:get_int("progress")*10 .. ":gui_furnace_arrow_fg.png^[transformR180]"
fs = fs .. "image[7,2;1,1;gui_furnace_arrow_bg.png^[lowpart:" .. meta:get_int("progress") * 10 .. ":gui_furnace_arrow_fg.png^[transformR180]"
fs = fs .. "list[context;output;7,3;1,1]"
fs = fs .. "button[2.25,4;1,1;prevpage;<-]"
fs = fs .. "button[5.25,4;1,1;nextpage;->]"
fs = fs .. "label[3.75,4;"..string.format("Page %s of %s",page,maxpage).."]"
fs = fs .. "label[3.75,4;" .. string.format("Page %s of %s", page, maxpage) .. "]"
if minetest.setting_getbool("creative_mode") then
fs = fs .."label[0,3.5;CREATIVE MODE\nTaking templates\nis enabled]"
fs = fs .. "label[0,3.5;CREATIVE MODE\nTaking templates\nis enabled]"
end
end
fs = fs .. "list[current_player;main;0.5,5;8,4]"
@ -136,7 +136,7 @@ local function update_inventory(pos)
local inv = meta:get_inventory()
local section = meta:get_string("section")
local itemcount = 0
for k,v in pairs(streets.signs.signtypes) do
for k, v in pairs(streets.signs.signtypes) do
if v.section == section then
itemcount = itemcount + 1
end
@ -144,23 +144,23 @@ local function update_inventory(pos)
inv:set_size("dye_needed", 0)
inv:set_size("list", 0)
inv:set_size("dye_needed", 6)
inv:set_size("list", math.ceil(itemcount/16)*16)
inv:set_size("list", math.ceil(itemcount / 16) * 16)
inv:set_size("dye", 32) -- 8x4
inv:set_size("surface", 1)
inv:set_size("template", 1)
inv:set_size("output", 1)
for k,v in pairs(streets.signs.signtypes) do
for k, v in pairs(streets.signs.signtypes) do
if v.section == section then
inv:add_item("list","streets:"..v.name)
inv:add_item("list", "streets:" .. v.name)
end
end
meta:set_int("maxpage", math.ceil(itemcount/16))
local templatestack = inv:get_stack("template",1)
meta:set_int("maxpage", math.ceil(itemcount / 16))
local templatestack = inv:get_stack("template", 1)
if templatestack and templatestack:to_string() ~= "" then
local selectedmarking = templatestack:to_table().name
local dyesneeded = streets.signs.signtypes[selectedmarking].dye_needed
for k,v in pairs(dyesneeded) do
inv:add_item("dye_needed", {name = "dye:"..k,count = v})
for k, v in pairs(dyesneeded) do
inv:add_item("dye_needed", { name = "dye:" .. k, count = v })
end
end
streets.signworkshop.update_formspec(pos)
@ -169,7 +169,7 @@ local function update_inventory(pos)
end
end
local function on_receive_fields(pos,formname,fields,sender)
local function on_receive_fields(pos, formname, fields, sender)
local meta = minetest.get_meta(pos)
if fields.tabs then
meta:set_int("tab", fields.tabs)
@ -179,7 +179,7 @@ local function on_receive_fields(pos,formname,fields,sender)
elseif fields.nextpage then
meta:set_int("page", meta:get_int("page") + 1)
else
for k,v in pairs(streets.signs.sections) do
for k, v in pairs(streets.signs.sections) do
if fields[v.name] then
meta:set_string("section", v.name)
meta:set_int("tab", 3)
@ -234,7 +234,7 @@ local function on_metadata_inventory_take(pos, listname, index, stack, player)
end
local function allow_metadata_inventory_put(pos, listname, index, stack, player)
if listname == "dye" and stack:get_name():sub(1,4) == "dye:" then
if listname == "dye" and stack:get_name():sub(1, 4) == "dye:" then
return stack:get_count()
elseif (listname == "surface" and stack:get_name() == "streets:sign_blank") or (listname == "list" and minetest.setting_getbool("creative_mode")) then
return stack:get_count()
@ -243,7 +243,7 @@ local function allow_metadata_inventory_put(pos, listname, index, stack, player)
end
end
local function can_dig(pos,player)
local function can_dig(pos, player)
local inv = minetest.get_meta(pos):get_inventory()
if inv:is_empty("dye") and inv:is_empty("surface") and inv:is_empty("output") then
return true
@ -254,30 +254,34 @@ end
minetest.register_node(":streets:sign_workshop", {
description = "Sign Workshop",
tiles = {"default_wood.png",},
tiles = {
"default_wood.png", "default_wood.png",
"default_wood.png^default_sign_steel.png", "default_wood.png^default_sign_steel.png",
"default_wood.png^default_sign_steel.png", "default_wood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 1},
groups = { cracky = 1 },
node_box = {
type = "fixed",
fixed = {
{-0.4375, 0.375, -0.1875, 0.4375, 0.4375, -0.125}, -- rail
{-0.125, 0.3125, -0.25, -0.0625, 0.375, -0.0625}, -- sprayer
{-0.5, -0.5, -0.5, -0.4375, 0.5, 0.5}, -- sideL
{0.4375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- sideR
{-0.4375, 0.3125, -0.5, -0.375, 0.375, 0.5}, -- railLB
{-0.4375, 0.4375, -0.5, -0.375, 0.5, 0.5}, -- railLT
{-0.4375, 0.375, -0.5, -0.375, 0.4375, -0.4375}, -- railLF
{-0.4375, -0.5, 0.4375, 0.4375, 0.5, 0.5}, -- sideR
{0.375, 0.3125, -0.5, 0.4375, 0.375, 0.5}, -- railRB
{0.375, 0.4375, -0.5, 0.4375, 0.5, 0.5}, -- railRT
{0.375, 0.375, -0.5, 0.4375, 0.4375, -0.4375}, -- railRF
{-0.4375, 0.375, 0.375, -0.375, 0.4375, 0.4375}, -- railLB
{0.375, 0.3125, 0.375, 0.4375, 0.375, 0.4375}, -- railRB
{-0.5, -0.5, -0.5, -0.375, 0.3125, 0.4375}, -- sideL2
{0.375, -0.5, -0.5, 0.4375, 0.3125, 0.4375}, -- sideR2
{-0.4375, -0.5, -0.4375, 0.4375, -0.1875, 0.4375}, -- body
{ -0.4375, 0.375, -0.1875, 0.4375, 0.4375, -0.125 }, -- rail
{ -0.125, 0.3125, -0.25, -0.0625, 0.375, -0.0625 }, -- sprayer
{ -0.5, -0.5, -0.5, -0.4375, 0.5, 0.5 }, -- sideL
{ 0.4375, -0.5, -0.5, 0.5, 0.5, 0.5 }, -- sideR
{ -0.4375, 0.3125, -0.5, -0.375, 0.375, 0.5 }, -- railLB
{ -0.4375, 0.4375, -0.5, -0.375, 0.5, 0.5 }, -- railLT
{ -0.4375, 0.375, -0.5, -0.375, 0.4375, -0.4375 }, -- railLF
{ -0.4375, -0.5, 0.4375, 0.4375, 0.5, 0.5 }, -- sideR
{ 0.375, 0.3125, -0.5, 0.4375, 0.375, 0.5 }, -- railRB
{ 0.375, 0.4375, -0.5, 0.4375, 0.5, 0.5 }, -- railRT
{ 0.375, 0.375, -0.5, 0.4375, 0.4375, -0.4375 }, -- railRF
{ -0.4375, 0.375, 0.375, -0.375, 0.4375, 0.4375 }, -- railLB
{ 0.375, 0.3125, 0.375, 0.4375, 0.375, 0.4375 }, -- railRB
{ -0.5, -0.5, -0.5, -0.375, 0.3125, 0.4375 }, -- sideL2
{ 0.375, -0.5, -0.5, 0.4375, 0.3125, 0.4375 }, -- sideR2
{ -0.4375, -0.5, -0.4375, 0.4375, -0.1875, 0.4375 }, -- body
}
},
selection_box = {
@ -293,3 +297,12 @@ minetest.register_node(":streets:sign_workshop", {
on_metadata_inventory_take = on_metadata_inventory_take,
can_dig = can_dig,
})
minetest.register_craft({
output = "streets:sign_workshop",
recipe = {
{ "streets:sign_blank", "streets:sign_blank", "streets:sign_blank" },
{ "streets:sign_blank", "default:mese_crystal_fragment", "streets:sign_blank" },
{ "streets:sign_blank", "streets:sign_blank", "streets:sign_blank" },
}
})

View File

@ -4,10 +4,10 @@
Optional: true
]]
minetest.register_node(":streets:steel_support",{
minetest.register_node(":streets:steel_support", {
description = "Steel support",
tiles = {"streets_support.png"},
groups = {cracky = 1},
tiles = { "streets_support.png" },
groups = { cracky = 1 },
drawtype = "glasslike_framed",
climbable = true,
sunlight_propagates = true,
@ -15,7 +15,7 @@ minetest.register_node(":streets:steel_support",{
collision_box = {
type = "fixed",
fixed = {
{-0.15, -0.5, -0.15, 0.15, 0.5, 0.15},
{ -0.15, -0.5, -0.15, 0.15, 0.5, 0.15 },
},
},
})
@ -23,8 +23,8 @@ minetest.register_node(":streets:steel_support",{
minetest.register_craft({
output = "streets:steel_support 5",
recipe = {
{"default:steel_ingot","","default:steel_ingot"},
{"","default:steel_ingot",""},
{"default:steel_ingot","","default:steel_ingot"}
{ "default:steel_ingot", "", "default:steel_ingot" },
{ "", "default:steel_ingot", "" },
{ "default:steel_ingot", "", "default:steel_ingot" }
}
})

File diff suppressed because it is too large Load Diff

View File

@ -8,9 +8,9 @@
== 1. General =
✓ create a new folder structure that is: easy to understand, easy to extend, easily configurable (important later on...)
- find suitable licenses for media/code: CC-BY-SA 3.0 seems to be fine for media, not sure which license I should choose for the code though...
find suitable licenses for media/code: CC-BY-SA 3.0 seems to be fine for media, not sure which license I should choose for the code though...
✓ create new 16px textures; many people asked for it...
- use kaeza's intllib
? use kaeza's intllib
- use Rubendwardy's achievements
== 2. API ==
@ -28,7 +28,7 @@
✓ The following nodes are available in white and yellow
✓ Arrows: left, right, straight on, straight on + left, straight on + right, straight on + left + right, left + right
✓ Middle lines: solid, dashed, double solid, double dashed, double mixed
... Side lines: solid slim, solid thick, dashed slim, dashed thick, outer edge thick, outer edge thin, inner edge thick, inner edge thin
Side lines: solid slim, solid thick, dashed slim, dashed thick, outer edge thick, outer edge thin, inner edge thick, inner edge thin
✓ Others: Parking, Forbidden area, crosswalk
=== 3.3 Roadworks ===
@ -41,15 +41,15 @@
✓ use walls API for concrete walls
=== 3.5 Passive road accessories ===
-? find a style that is not too country specific but still easy for everyone to understand
find a style that is not too country specific but still easy for everyone to understand
* Possibly include the old signs, but maybe with some country specific? I'd love to have at least some of the most common USA ones in there. (cheapie)
* Let's forget to be un-country-specific. Let's include US and EU ones, that should satisfy many players. We can make the sign workshop use tabs to organise them into categories and a dropdown to select the set to be used. (wd97)
- Warning signs: "!", lava, water, construction area, curves, railroad crossings, crosswalks, "Baken"
... Traffic: "STOP", "Railroad", "Give way", "right of way", "Priority", "One way", "roundabout (a square of course)", "dead end", "Parking"
Warning signs: "!", lava, water, construction area, curves, railroad crossings, crosswalks, "Baken"
Traffic: "STOP", "Railroad", "Give way", "right of way", "Priority", "One way", "roundabout (a square of course)", "dead end", "Parking"
- Writable using signs_lib (hopefully?): city entrance/exit, street name, guideposts
* Especially in this category, the list of signs is subject to change. If something is not possible due to graphical or technical limitations, it won't get implemented.
* Spontaneous ideas of mine are possible and very likely...
- Traffic barriers
Traffic barriers
✓ delineators
=== 3.6 Active road accessories
@ -57,9 +57,9 @@
* = streets/laneuse
✓ Trafficlight (off, red, yellow, green)
✓? (ambiguous) Trafficlight (off, red, yellow)
- Compact and portable trafficlight (e.g. for roadworks)
Compact and portable trafficlight (e.g. for roadworks)
✓ Blinking light (off, yellow)
- bollards
bollards
=== 3.7 Railroad crossings ===
✓ Controllable barriers (manual (punch) or mesecons)