update to use new signs_lib API -- requires signs_lib commit 4ff54c9a and above
529
api.lua
@ -1,529 +0,0 @@
|
||||
-- signs api; most of this came from signs_lib but rewritten to some degree
|
||||
|
||||
local S = street_signs.gettext
|
||||
|
||||
street_signs.standard_yaw = {
|
||||
0,
|
||||
math.pi / -2,
|
||||
math.pi,
|
||||
math.pi / 2,
|
||||
}
|
||||
|
||||
street_signs.wallmounted_yaw = {
|
||||
nil,
|
||||
nil,
|
||||
math.pi / -2,
|
||||
math.pi / 2,
|
||||
0,
|
||||
math.pi,
|
||||
}
|
||||
|
||||
local wall_dir_change = {
|
||||
[0] = 2,
|
||||
2,
|
||||
5,
|
||||
4,
|
||||
2,
|
||||
3,
|
||||
}
|
||||
|
||||
-- Initialize character texture cache
|
||||
local ctexcache = {}
|
||||
|
||||
street_signs.wallmounted_rotate = function(pos, node, user, mode)
|
||||
if mode ~= screwdriver.ROTATE_FACE then return false end
|
||||
minetest.swap_node(pos, { name = node.name, param2 = wall_dir_change[node.param2 % 6] })
|
||||
for _, v in ipairs(minetest.get_objects_inside_radius(pos, 0.5)) do
|
||||
local e = v:get_luaentity()
|
||||
if e and e.name == "street_signs:text" then
|
||||
v:remove()
|
||||
end
|
||||
end
|
||||
street_signs.update_sign(pos)
|
||||
return true
|
||||
end
|
||||
|
||||
street_signs.facedir_rotate = function(pos, node, user, mode)
|
||||
if mode ~= screwdriver.ROTATE_FACE then return false end
|
||||
newparam2 = ((node.param2 % 6 ) == 0) and 1 or 0
|
||||
minetest.swap_node(pos, { name = node.name, param2 = newparam2 })
|
||||
for _, v in ipairs(minetest.get_objects_inside_radius(pos, 0.5)) do
|
||||
local e = v:get_luaentity()
|
||||
if e and e.name == "street_signs:text" then
|
||||
v:remove()
|
||||
end
|
||||
end
|
||||
street_signs.update_sign(pos)
|
||||
return true
|
||||
end
|
||||
|
||||
street_signs.modpath = minetest.get_modpath("street_signs")
|
||||
|
||||
local DEFAULT_TEXT_SCALE = {x=10, y=10}
|
||||
|
||||
-- infinite stacks
|
||||
|
||||
if not minetest.settings:get_bool("creative_mode") then
|
||||
street_signs.expect_infinite_stacks = false
|
||||
else
|
||||
street_signs.expect_infinite_stacks = true
|
||||
end
|
||||
|
||||
-- CONSTANTS
|
||||
|
||||
-- Path to the textures.
|
||||
local TP = street_signs.path .. "/textures"
|
||||
-- Font file formatter
|
||||
local CHAR_FILE = "%s_%02x.png"
|
||||
-- Fonts path
|
||||
local CHAR_PATH = TP .. "/" .. CHAR_FILE
|
||||
|
||||
-- Lots of overkill here. KISS advocates, go away, shoo! ;) -- kaeza
|
||||
|
||||
local PNG_HDR = string.char(0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A)
|
||||
|
||||
-- check if a file does exist
|
||||
-- to avoid reopening file after checking again
|
||||
-- pass TRUE as second argument
|
||||
function file_exists(name, return_handle, mode)
|
||||
mode = mode or "r";
|
||||
local f = io.open(name, mode)
|
||||
if f ~= nil then
|
||||
if (return_handle) then
|
||||
return f
|
||||
end
|
||||
io.close(f)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
-- Read the image size from a PNG file.
|
||||
-- Returns image_w, image_h.
|
||||
-- Only the LSB is read from each field!
|
||||
local function read_image_size(filename)
|
||||
local f = file_exists(filename, true, "rb")
|
||||
-- file might not exist (don't crash the game)
|
||||
if (not f) then
|
||||
return 0, 0
|
||||
end
|
||||
f:seek("set", 0x0)
|
||||
local hdr = f:read(string.len(PNG_HDR))
|
||||
if hdr ~= PNG_HDR then
|
||||
f:close()
|
||||
return
|
||||
end
|
||||
f:seek("set", 0x13)
|
||||
local ws = f:read(1)
|
||||
f:seek("set", 0x17)
|
||||
local hs = f:read(1)
|
||||
f:close()
|
||||
return ws:byte(), hs:byte()
|
||||
end
|
||||
|
||||
-- 4 rows, max 80 chars per, plus a bit of fudge to
|
||||
-- avoid excess trimming (e.g. due to color codes)
|
||||
|
||||
local MAX_INPUT_CHARS = 400
|
||||
|
||||
-- helper functions to trim sign text input/output
|
||||
|
||||
local function trim_input(text)
|
||||
return text:sub(1, math.min(MAX_INPUT_CHARS, text:len()))
|
||||
end
|
||||
|
||||
local function build_char_db(font_size)
|
||||
|
||||
local cw = {}
|
||||
|
||||
-- To calculate average char width.
|
||||
local total_width = 0
|
||||
local char_count = 0
|
||||
|
||||
for c = 32, 255 do
|
||||
local w, h = read_image_size(CHAR_PATH:format("street_signs_font_"..font_size.."px", c))
|
||||
if w and h then
|
||||
local ch = string.char(c)
|
||||
cw[ch] = w
|
||||
total_width = total_width + w
|
||||
char_count = char_count + 1
|
||||
end
|
||||
end
|
||||
|
||||
local cbw, cbh = read_image_size(TP.."/street_signs_color_"..font_size.."px_n.png")
|
||||
assert(cbw and cbh, "error reading bg dimensions")
|
||||
return cw, cbw, cbh, (total_width / char_count)
|
||||
end
|
||||
|
||||
street_signs.charwidth15,
|
||||
street_signs.colorbgw15,
|
||||
street_signs.lineheight15,
|
||||
street_signs.avgwidth15 = build_char_db(15)
|
||||
|
||||
street_signs.charwidth31,
|
||||
street_signs.colorbgw31,
|
||||
street_signs.lineheight31,
|
||||
street_signs.avgwidth31 = build_char_db(31)
|
||||
|
||||
local sign_groups = {choppy=2, dig_immediate=2}
|
||||
local fences_with_sign = { }
|
||||
|
||||
-- some local helper functions
|
||||
|
||||
local function split_lines_and_words(text)
|
||||
if not text then return end
|
||||
local lines = { }
|
||||
for _, line in ipairs(text:split("\n")) do
|
||||
table.insert(lines, line:split(" "))
|
||||
end
|
||||
return lines
|
||||
end
|
||||
|
||||
local math_max = math.max
|
||||
|
||||
local function fill_line(x, y, w, c, font_size, colorbgw)
|
||||
c = c or "0"
|
||||
local tex = { }
|
||||
for xx = 0, math.max(0, w), colorbgw do
|
||||
table.insert(tex, (":%d,%d=street_signs_color_"..font_size.."px_%s.png"):format(x + xx, y, c))
|
||||
end
|
||||
return table.concat(tex)
|
||||
end
|
||||
|
||||
-- make char texture file name
|
||||
-- if texture file does not exist use fallback texture instead
|
||||
local function char_tex(font_name, ch)
|
||||
if ctexcache[font_name..ch] then
|
||||
return ctexcache[font_name..ch], true
|
||||
else
|
||||
local c = ch:byte()
|
||||
local exists, tex = file_exists(CHAR_PATH:format(font_name, c))
|
||||
if exists and c ~= 14 then
|
||||
tex = CHAR_FILE:format(font_name, c)
|
||||
else
|
||||
tex = CHAR_FILE:format(font_name, 0x0)
|
||||
end
|
||||
ctexcache[font_name..ch] = tex
|
||||
return tex, exists
|
||||
end
|
||||
end
|
||||
|
||||
local function make_line_texture(line, lineno, pos, line_width, line_height, cwidth_tab, font_size, colorbgw)
|
||||
local width = 0
|
||||
local maxw = 0
|
||||
local font_name = "street_signs_font_"..font_size.."px"
|
||||
|
||||
local words = { }
|
||||
local node = minetest.get_node(pos)
|
||||
local def = minetest.registered_items[node.name]
|
||||
local default_color = def.default_color or 0
|
||||
|
||||
local cur_color = tonumber(default_color, 16)
|
||||
|
||||
-- We check which chars are available here.
|
||||
for word_i, word in ipairs(line) do
|
||||
local chars = { }
|
||||
local ch_offs = 0
|
||||
word = string.gsub(word, "%^[12345678abcdefgh]", {
|
||||
["^1"] = string.char(0x81),
|
||||
["^2"] = string.char(0x82),
|
||||
["^3"] = string.char(0x83),
|
||||
["^4"] = string.char(0x84),
|
||||
["^5"] = string.char(0x85),
|
||||
["^6"] = string.char(0x86),
|
||||
["^7"] = string.char(0x87),
|
||||
["^8"] = string.char(0x88),
|
||||
["^a"] = string.char(0x8a),
|
||||
["^b"] = string.char(0x8b),
|
||||
["^c"] = string.char(0x8c),
|
||||
["^d"] = string.char(0x8d),
|
||||
["^e"] = string.char(0x8e),
|
||||
["^f"] = string.char(0x8f),
|
||||
["^g"] = string.char(0x90),
|
||||
["^h"] = string.char(0x91)
|
||||
})
|
||||
local word_l = #word
|
||||
local i = 1
|
||||
while i <= word_l do
|
||||
local c = word:sub(i, i)
|
||||
if c == "#" then
|
||||
local cc = tonumber(word:sub(i+1, i+1), 16)
|
||||
if cc then
|
||||
i = i + 1
|
||||
cur_color = cc
|
||||
end
|
||||
else
|
||||
local w = cwidth_tab[c]
|
||||
if w then
|
||||
width = width + w + 1
|
||||
if width >= (line_width - cwidth_tab[" "]) then
|
||||
width = 0
|
||||
else
|
||||
maxw = math_max(width, maxw)
|
||||
end
|
||||
if #chars < MAX_INPUT_CHARS then
|
||||
table.insert(chars, {
|
||||
off = ch_offs,
|
||||
tex = char_tex(font_name, c),
|
||||
col = ("%X"):format(cur_color),
|
||||
})
|
||||
end
|
||||
ch_offs = ch_offs + w
|
||||
end
|
||||
end
|
||||
i = i + 1
|
||||
end
|
||||
width = width + cwidth_tab[" "] + 1
|
||||
maxw = math_max(width, maxw)
|
||||
table.insert(words, { chars=chars, w=ch_offs })
|
||||
end
|
||||
|
||||
-- Okay, we actually build the "line texture" here.
|
||||
|
||||
local texture = { }
|
||||
|
||||
local start_xpos = math.floor((line_width - maxw) / 2) + def.x_offset
|
||||
|
||||
local xpos = start_xpos
|
||||
local ypos = (line_height + def.line_spacing)* lineno + def.y_offset
|
||||
|
||||
cur_color = nil
|
||||
|
||||
for word_i, word in ipairs(words) do
|
||||
local xoffs = (xpos - start_xpos)
|
||||
if (xoffs > 0) and ((xoffs + word.w) > maxw) then
|
||||
table.insert(texture, fill_line(xpos, ypos, maxw, "n", font_size, colorbgw))
|
||||
xpos = start_xpos
|
||||
ypos = ypos + line_height + def.line_spacing
|
||||
lineno = lineno + 1
|
||||
if lineno >= def.number_of_lines then break end
|
||||
table.insert(texture, fill_line(xpos, ypos, maxw, cur_color, font_size, colorbgw))
|
||||
end
|
||||
for ch_i, ch in ipairs(word.chars) do
|
||||
if ch.col ~= cur_color then
|
||||
cur_color = ch.col
|
||||
table.insert(texture, fill_line(xpos + ch.off, ypos, maxw, cur_color, font_size, colorbgw))
|
||||
end
|
||||
table.insert(texture, (":%d,%d=%s"):format(xpos + ch.off, ypos, ch.tex))
|
||||
end
|
||||
table.insert(
|
||||
texture,
|
||||
(":%d,%d="):format(xpos + word.w, ypos) .. char_tex(font_name, " ")
|
||||
)
|
||||
xpos = xpos + word.w + cwidth_tab[" "]
|
||||
if xpos >= (line_width + cwidth_tab[" "]) then break end
|
||||
end
|
||||
|
||||
table.insert(texture, fill_line(xpos, ypos, maxw, "n", font_size, colorbgw))
|
||||
table.insert(texture, fill_line(start_xpos, ypos + line_height, maxw, "n", font_size, colorbgw))
|
||||
|
||||
return table.concat(texture), lineno
|
||||
end
|
||||
|
||||
local function make_sign_texture(lines, pos)
|
||||
local node = minetest.get_node(pos)
|
||||
local def = minetest.registered_items[node.name]
|
||||
|
||||
local font_size
|
||||
local line_width
|
||||
local line_height
|
||||
local char_width
|
||||
local colorbgw
|
||||
|
||||
if def.font_size and def.font_size == 31 then
|
||||
font_size = 31
|
||||
line_width = math.floor(street_signs.avgwidth31 * def.chars_per_line) * def.horiz_scaling
|
||||
line_height = street_signs.lineheight31
|
||||
char_width = street_signs.charwidth31
|
||||
colorbgw = street_signs.colorbgw31
|
||||
else
|
||||
font_size = 15
|
||||
line_width = math.floor(street_signs.avgwidth15 * def.chars_per_line) * def.horiz_scaling
|
||||
line_height = street_signs.lineheight15
|
||||
char_width = street_signs.charwidth15
|
||||
colorbgw = street_signs.colorbgw15
|
||||
end
|
||||
|
||||
local texture = { ("[combine:%dx%d"):format(line_width, (line_height + def.line_spacing) * def.number_of_lines * def.vert_scaling) }
|
||||
|
||||
local lineno = 0
|
||||
for i = 1, #lines do
|
||||
if lineno >= def.number_of_lines then break end
|
||||
local linetex, ln = make_line_texture(lines[i], lineno, pos, line_width, line_height, char_width, font_size, colorbgw)
|
||||
table.insert(texture, linetex)
|
||||
lineno = ln + 1
|
||||
end
|
||||
table.insert(texture, "^[makealpha:0,0,0")
|
||||
return table.concat(texture, "")
|
||||
end
|
||||
|
||||
local function set_obj_text(obj, text, x, pos)
|
||||
local split = split_lines_and_words
|
||||
local text_ansi = Utf8ToAnsi(text)
|
||||
local n = minetest.registered_nodes[minetest.get_node(pos).name]
|
||||
local text_scale = (n and n.text_scale) or DEFAULT_TEXT_SCALE
|
||||
local texture = make_sign_texture(split(text_ansi), pos)
|
||||
obj:set_properties({
|
||||
textures={texture},
|
||||
visual_size = text_scale,
|
||||
})
|
||||
end
|
||||
|
||||
street_signs.construct_sign = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string(
|
||||
"formspec",
|
||||
"size[5,2.25]"..
|
||||
"textarea[0.55,0.1;4.5,1.5;text;;${text}]"..
|
||||
"button_exit[1.5,1.65;2,1;ok;"..S("Write").."]"..
|
||||
"background[-0.20,-0.25;5.41,2.98;street_signs_bg.png]")
|
||||
meta:set_string("infotext", "")
|
||||
end
|
||||
|
||||
street_signs.destruct_sign = function(pos)
|
||||
local objects = minetest.get_objects_inside_radius(pos, 0.5)
|
||||
for _, v in ipairs(objects) do
|
||||
local e = v:get_luaentity()
|
||||
if e and e.name == "street_signs:text" then
|
||||
v:remove()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function make_infotext(text)
|
||||
text = trim_input(text)
|
||||
local lines = split_lines_and_words(text) or {}
|
||||
local lines2 = { }
|
||||
for _, line in ipairs(lines) do
|
||||
table.insert(lines2, (table.concat(line, " "):gsub("#[0-9a-fA-F]", ""):gsub("##", "#")))
|
||||
end
|
||||
return table.concat(lines2, "\n")
|
||||
end
|
||||
|
||||
street_signs.update_sign = function(pos, fields)
|
||||
local meta = minetest.get_meta(pos)
|
||||
|
||||
local text = fields and fields.text or meta:get_string("text")
|
||||
text = trim_input(text)
|
||||
|
||||
meta:set_string("infotext", make_infotext(text).." ")
|
||||
meta:set_string("text", text)
|
||||
|
||||
local objects = minetest.get_objects_inside_radius(pos, 0.5)
|
||||
local found
|
||||
for _, v in ipairs(objects) do
|
||||
local e = v:get_luaentity()
|
||||
if e and e.name == "street_signs:text" then
|
||||
if found then
|
||||
v:remove()
|
||||
else
|
||||
set_obj_text(v, text, nil, pos)
|
||||
found = true
|
||||
end
|
||||
end
|
||||
end
|
||||
if found then
|
||||
return
|
||||
end
|
||||
|
||||
-- if there is no entity
|
||||
local signnode = minetest.get_node(pos)
|
||||
local signname = signnode.name
|
||||
local def = minetest.registered_items[signname]
|
||||
if not def.entity_info or not def.entity_info.yaw[signnode.param2 + 1] then return end
|
||||
local obj = minetest.add_entity(pos, "street_signs:text")
|
||||
|
||||
obj:setyaw(def.entity_info.yaw[signnode.param2 + 1])
|
||||
obj:set_properties({
|
||||
mesh = def.entity_info.mesh,
|
||||
})
|
||||
end
|
||||
|
||||
function street_signs.receive_fields(pos, formname, fields, sender)
|
||||
if minetest.is_protected(pos, sender:get_player_name()) then
|
||||
minetest.record_protection_violation(pos,
|
||||
sender:get_player_name())
|
||||
return
|
||||
end
|
||||
if fields and fields.text and fields.ok then
|
||||
minetest.log("action", S("@1 wrote \"@2\" to sign at @3",
|
||||
(sender:get_player_name() or ""),
|
||||
fields.text:gsub('\\', '\\\\'):gsub("\n", "\\n"),
|
||||
minetest.pos_to_string(pos)
|
||||
))
|
||||
street_signs.update_sign(pos, fields)
|
||||
end
|
||||
end
|
||||
|
||||
local signs_text_on_activate
|
||||
|
||||
signs_text_on_activate = function(self)
|
||||
local pos = self.object:getpos()
|
||||
local meta = minetest.get_meta(pos)
|
||||
local signnode = minetest.get_node(pos)
|
||||
local signname = signnode.name
|
||||
local def = minetest.registered_items[signname]
|
||||
local text = meta:get_string("text")
|
||||
if text and def and def.entity_info then
|
||||
text = trim_input(text)
|
||||
set_obj_text(self.object, text, nil, pos)
|
||||
self.object:set_properties({
|
||||
mesh = def.entity_info.mesh,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_entity("street_signs:text", {
|
||||
collisionbox = { 0, 0, 0, 0, 0, 0 },
|
||||
visual = "mesh",
|
||||
mesh = "street_signs_basic_entity.obj",
|
||||
textures = {},
|
||||
on_activate = signs_text_on_activate,
|
||||
})
|
||||
|
||||
-- make selection boxes
|
||||
-- sizex/sizey specified in inches because that's what MUTCD uses.
|
||||
|
||||
function street_signs.make_selection_boxes(sizex, sizey, onpole, xoffs, yoffs, zoffs)
|
||||
local tx = (sizex * 0.0254 ) / 2
|
||||
local ty = (sizey * 0.0254 ) / 2
|
||||
local xo = xoffs and xoffs * 0.0254 or 0
|
||||
local yo = yoffs and yoffs * 0.0254 or 0
|
||||
local zo = zoffs and zoffs * 0.0254 or 0
|
||||
|
||||
|
||||
local t = { -0.5, -ty + yo, -tx + xo, -0.4375, ty + yo, tx + xo }
|
||||
|
||||
if onpole == "_onpole" then
|
||||
return {
|
||||
type = "wallmounted",
|
||||
wall_side = { t[1] - 0.3125 + zo, t[2], t[3], t[4] - 0.3125 + zo, t[5], t[6] },
|
||||
wall_top = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5 },
|
||||
wall_bottom = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5 },
|
||||
}
|
||||
else
|
||||
return {
|
||||
type = "wallmounted",
|
||||
wall_side = t,
|
||||
wall_top = { t[3] - xo, -t[1], t[2] + yo, t[6] - xo, -t[4], t[5] + yo},
|
||||
wall_bottom = { t[3] - xo, t[1], t[2] + yo, t[6] - xo, t[4], t[5] + yo }
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
-- switch models to pole-mounted if appropriate
|
||||
|
||||
street_signs.after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
local ppos = minetest.get_pointed_thing_position(pointed_thing)
|
||||
local pnode = minetest.get_node(ppos)
|
||||
local pdef = minetest.registered_items[pnode.name]
|
||||
if (pdef and pdef.drawtype == "fencelike")
|
||||
or string.find(pnode.name, "default:fence_")
|
||||
or pnode.name == "coloredwood:fence"
|
||||
or (pnode.name == "streets:bigpole" and pnode.param2 < 4)
|
||||
or (pnode.name == "streets:bigpole" and pnode.param2 > 19 and pnode.param2 < 24) then
|
||||
local node = minetest.get_node(pos)
|
||||
minetest.swap_node(pos, {name = itemstack:get_name().."_onpole", param2 = node.param2})
|
||||
end
|
||||
end
|
@ -1,5 +1,5 @@
|
||||
default
|
||||
signs_lib
|
||||
intllib?
|
||||
screwdriver?
|
||||
signs_lib?
|
||||
infrastructure?
|
||||
|
265
encoding.lua
@ -1,265 +0,0 @@
|
||||
-- encoding borrowed from signs_lib mod of https://github.com/lord-server/lord
|
||||
|
||||
local ansi_decode = {
|
||||
[128] = "\208\130",
|
||||
[129] = "\208\131",
|
||||
[130] = "\226\128\154",
|
||||
[131] = "\209\147",
|
||||
[132] = "\226\128\158",
|
||||
[133] = "\226\128\166",
|
||||
[134] = "\226\128\160",
|
||||
[135] = "\226\128\161",
|
||||
[136] = "\226\130\172",
|
||||
[137] = "\226\128\176",
|
||||
[138] = "\208\137",
|
||||
[139] = "\226\128\185",
|
||||
[140] = "\208\138",
|
||||
[141] = "\208\140",
|
||||
[142] = "\208\139",
|
||||
[143] = "\208\143",
|
||||
[144] = "\209\146",
|
||||
[145] = "\226\128\152",
|
||||
[146] = "\226\128\153",
|
||||
[147] = "\226\128\156",
|
||||
[148] = "\226\128\157",
|
||||
[149] = "\226\128\162",
|
||||
[150] = "\226\128\147",
|
||||
[151] = "\226\128\148",
|
||||
[152] = "\194\152",
|
||||
[153] = "\226\132\162",
|
||||
[154] = "\209\153",
|
||||
[155] = "\226\128\186",
|
||||
[156] = "\209\154",
|
||||
[157] = "\209\156",
|
||||
[158] = "\209\155",
|
||||
[159] = "\209\159",
|
||||
[160] = "\194\160",
|
||||
[161] = "\209\142",
|
||||
[162] = "\209\158",
|
||||
[163] = "\208\136",
|
||||
[164] = "\194\164",
|
||||
[165] = "\210\144",
|
||||
[166] = "\194\166",
|
||||
[167] = "\194\167",
|
||||
[168] = "\208\129",
|
||||
[169] = "\194\169",
|
||||
[170] = "\208\132",
|
||||
[171] = "\194\171",
|
||||
[172] = "\194\172",
|
||||
[173] = "\194\173",
|
||||
[174] = "\194\174",
|
||||
[175] = "\208\135",
|
||||
[176] = "\194\176",
|
||||
[177] = "\194\177",
|
||||
[178] = "\208\134",
|
||||
[179] = "\209\150",
|
||||
[180] = "\210\145",
|
||||
[181] = "\194\181",
|
||||
[182] = "\194\182",
|
||||
[183] = "\194\183",
|
||||
[184] = "\209\145",
|
||||
[185] = "\226\132\150",
|
||||
[186] = "\209\148",
|
||||
[187] = "\194\187",
|
||||
[188] = "\209\152",
|
||||
[189] = "\208\133",
|
||||
[190] = "\209\149",
|
||||
[191] = "\209\151"
|
||||
}
|
||||
local utf8_decode = {
|
||||
[128] = {
|
||||
[147] = "\150",
|
||||
[148] = "\151",
|
||||
[152] = "\145",
|
||||
[153] = "\146",
|
||||
[154] = "\130",
|
||||
[156] = "\147",
|
||||
[157] = "\148",
|
||||
[158] = "\132",
|
||||
[160] = "\134",
|
||||
[161] = "\135",
|
||||
[162] = "\149",
|
||||
[166] = "\133",
|
||||
[176] = "\137",
|
||||
[185] = "\139",
|
||||
[186] = "\155"
|
||||
},
|
||||
[130] = {[172] = "\136"},
|
||||
[132] = {[150] = "\185", [162] = "\153"},
|
||||
[194] = {
|
||||
[152] = "\152",
|
||||
[160] = "\160",
|
||||
[164] = "\164",
|
||||
[166] = "\166",
|
||||
[167] = "\167",
|
||||
[169] = "\169",
|
||||
[171] = "\171",
|
||||
[172] = "\172",
|
||||
[173] = "\173",
|
||||
[174] = "\174",
|
||||
[176] = "\176",
|
||||
[177] = "\177",
|
||||
[181] = "\181",
|
||||
[182] = "\182",
|
||||
[183] = "\183",
|
||||
[187] = "\187"
|
||||
},
|
||||
[208] = {
|
||||
[129] = "\168",
|
||||
[130] = "\128",
|
||||
[131] = "\129",
|
||||
[132] = "\170",
|
||||
[133] = "\189",
|
||||
[134] = "\178",
|
||||
[135] = "\175",
|
||||
[136] = "\163",
|
||||
[137] = "\138",
|
||||
[138] = "\140",
|
||||
[139] = "\142",
|
||||
[140] = "\141",
|
||||
[143] = "\143",
|
||||
[144] = "\192",
|
||||
[145] = "\193",
|
||||
[146] = "\194",
|
||||
[147] = "\195",
|
||||
[148] = "\196",
|
||||
[149] = "\197",
|
||||
[150] = "\198",
|
||||
[151] = "\199",
|
||||
[152] = "\200",
|
||||
[153] = "\201",
|
||||
[154] = "\202",
|
||||
[155] = "\203",
|
||||
[156] = "\204",
|
||||
[157] = "\205",
|
||||
[158] = "\206",
|
||||
[159] = "\207",
|
||||
[160] = "\208",
|
||||
[161] = "\209",
|
||||
[162] = "\210",
|
||||
[163] = "\211",
|
||||
[164] = "\212",
|
||||
[165] = "\213",
|
||||
[166] = "\214",
|
||||
[167] = "\215",
|
||||
[168] = "\216",
|
||||
[169] = "\217",
|
||||
[170] = "\218",
|
||||
[171] = "\219",
|
||||
[172] = "\220",
|
||||
[173] = "\221",
|
||||
[174] = "\222",
|
||||
[175] = "\223",
|
||||
[176] = "\224",
|
||||
[177] = "\225",
|
||||
[178] = "\226",
|
||||
[179] = "\227",
|
||||
[180] = "\228",
|
||||
[181] = "\229",
|
||||
[182] = "\230",
|
||||
[183] = "\231",
|
||||
[184] = "\232",
|
||||
[185] = "\233",
|
||||
[186] = "\234",
|
||||
[187] = "\235",
|
||||
[188] = "\236",
|
||||
[189] = "\237",
|
||||
[190] = "\238",
|
||||
[191] = "\239"
|
||||
},
|
||||
[209] = {
|
||||
[128] = "\240",
|
||||
[129] = "\241",
|
||||
[130] = "\242",
|
||||
[131] = "\243",
|
||||
[132] = "\244",
|
||||
[133] = "\245",
|
||||
[134] = "\246",
|
||||
[135] = "\247",
|
||||
[136] = "\248",
|
||||
[137] = "\249",
|
||||
[138] = "\250",
|
||||
[139] = "\251",
|
||||
[140] = "\252",
|
||||
[141] = "\253",
|
||||
[142] = "\254",
|
||||
[143] = "\255",
|
||||
[144] = "\161",
|
||||
[145] = "\184",
|
||||
[146] = "\144",
|
||||
[147] = "\131",
|
||||
[148] = "\186",
|
||||
[149] = "\190",
|
||||
[150] = "\179",
|
||||
[151] = "\191",
|
||||
[152] = "\188",
|
||||
[153] = "\154",
|
||||
[154] = "\156",
|
||||
[155] = "\158",
|
||||
[156] = "\157",
|
||||
[158] = "\162",
|
||||
[159] = "\159"
|
||||
},
|
||||
[210] = {[144] = "\165", [145] = "\180"}
|
||||
}
|
||||
|
||||
local nmdc = {
|
||||
[36] = "$",
|
||||
[124] = "|"
|
||||
}
|
||||
|
||||
function AnsiToUtf8(s)
|
||||
local r, b = ""
|
||||
for i = 1, s and s:len() or 0 do
|
||||
b = s:byte(i)
|
||||
if b < 128 then
|
||||
r = r .. string.char(b)
|
||||
else
|
||||
if b > 239 then
|
||||
r = r .. "\209" .. string.char(b - 112)
|
||||
elseif b > 191 then
|
||||
r = r .. "\208" .. string.char(b - 48)
|
||||
elseif ansi_decode[b] then
|
||||
r = r .. ansi_decode[b]
|
||||
else
|
||||
r = r .. "_"
|
||||
end
|
||||
end
|
||||
end
|
||||
return r
|
||||
end
|
||||
|
||||
function Utf8ToAnsi(s)
|
||||
local a, j, r, b = 0, 0, ""
|
||||
for i = 1, s and s:len() or 0 do
|
||||
b = s:byte(i)
|
||||
if b < 128 then
|
||||
if nmdc[b] then
|
||||
r = r .. nmdc[b]
|
||||
else
|
||||
r = r .. string.char(b)
|
||||
end
|
||||
elseif a == 2 then
|
||||
a, j = a - 1, b
|
||||
elseif a == 1 then
|
||||
--if j == nil or b == nil then return r end
|
||||
--print(j)
|
||||
--print(b)
|
||||
--local ansi = utf8_decode[j]
|
||||
--if ansi == nil then return r end
|
||||
--if ansi[b] == nil then return r end
|
||||
if utf8_decode[j] then
|
||||
if utf8_decode[j][b] then
|
||||
a, r = a - 1, r .. utf8_decode[j][b]
|
||||
end
|
||||
end
|
||||
elseif b == 226 then
|
||||
a = 2
|
||||
elseif b == 194 or b == 208 or b == 209 or b == 210 then
|
||||
j, a = b, 1
|
||||
else
|
||||
r = r .. "_"
|
||||
end
|
||||
end
|
||||
return r
|
||||
end
|
6
init.lua
@ -12,14 +12,8 @@ screwdriver = screwdriver or {}
|
||||
|
||||
-- Load support for intllib.
|
||||
local S, NS = dofile(street_signs.path .. "/intllib.lua")
|
||||
street_signs.gettext = S
|
||||
|
||||
dofile(street_signs.path .. "/encoding.lua") -- text encoding
|
||||
|
||||
street_signs.lbm_restore_nodes = {}
|
||||
|
||||
dofile(street_signs.path.."/api.lua")
|
||||
|
||||
street_signs.big_sign_sizes = {
|
||||
-- "size", lines, chars, hscale, vscale, xoffs, yoffs, box
|
||||
{ "small", 3, 50, 1.3, 1.05, 7, 5, { -0.5, -0.5, -0.5, -0.4, 0.5, 1.5 } },
|
||||
|
@ -1,6 +1,6 @@
|
||||
-- Class D signs
|
||||
|
||||
local S = street_signs.gettext
|
||||
local S = signs_lib.gettext
|
||||
local cbox
|
||||
|
||||
local cbox = {
|
||||
@ -26,11 +26,11 @@ minetest.register_node("street_signs:sign_basic", {
|
||||
tiles = { "street_signs_basic.png" },
|
||||
groups = {choppy=2, dig_immediate=2},
|
||||
default_color = "f",
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_rotate = street_signs.facedir_rotate,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = signs_lib.facedir_rotate,
|
||||
number_of_lines = 2,
|
||||
horiz_scaling = 0.8,
|
||||
vert_scaling = 1,
|
||||
@ -41,7 +41,7 @@ minetest.register_node("street_signs:sign_basic", {
|
||||
chars_per_line = 40,
|
||||
entity_info = {
|
||||
mesh = "street_signs_basic_entity.obj",
|
||||
yaw = street_signs.standard_yaw
|
||||
yaw = signs_lib.standard_yaw
|
||||
}
|
||||
})
|
||||
|
||||
@ -69,11 +69,11 @@ minetest.register_node("street_signs:sign_basic_top_only", {
|
||||
tiles = { "street_signs_basic.png" },
|
||||
groups = {choppy=2, dig_immediate=2},
|
||||
default_color = "f",
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_rotate = street_signs.facedir_rotate,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = signs_lib.facedir_rotate,
|
||||
number_of_lines = 2,
|
||||
horiz_scaling = 0.8,
|
||||
vert_scaling = 1,
|
||||
@ -84,26 +84,26 @@ minetest.register_node("street_signs:sign_basic_top_only", {
|
||||
chars_per_line = 40,
|
||||
entity_info = {
|
||||
mesh = "street_signs_basic_top_only_entity.obj",
|
||||
yaw = street_signs.standard_yaw
|
||||
yaw = signs_lib.standard_yaw
|
||||
}
|
||||
})
|
||||
|
||||
table.insert(street_signs.lbm_restore_nodes, "street_signs:sign_basic")
|
||||
table.insert(street_signs.lbm_restore_nodes, "street_signs:sign_basic_top_only")
|
||||
table.insert(signs_lib.lbm_restore_nodes, "street_signs:sign_basic")
|
||||
table.insert(signs_lib.lbm_restore_nodes, "street_signs:sign_basic_top_only")
|
||||
|
||||
for _, onpole in ipairs({"", "_onpole"}) do
|
||||
|
||||
local nci = nil
|
||||
local on_rotate = street_signs.wallmounted_rotate
|
||||
local on_rotate = signs_lib.wallmounted_rotate
|
||||
local pole_mount_tex = nil
|
||||
|
||||
if onpole == "_onpole" then
|
||||
nci = 1
|
||||
on_rotate = nil
|
||||
pole_mount_tex = "street_signs_pole_mount.png"
|
||||
pole_mount_tex = "signs_lib_pole_mount.png"
|
||||
end
|
||||
|
||||
cbox = street_signs.make_selection_boxes(24, 24, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(24, 24, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_service_hospital"..onpole, {
|
||||
description = "D9-2: General service: hospital",
|
||||
@ -122,7 +122,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_service_hospital_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_service_hospital"
|
||||
})
|
||||
@ -144,7 +144,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_service_handicapped_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_service_handicapped"
|
||||
})
|
||||
@ -166,7 +166,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_service_fuel_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_service_fuel"
|
||||
})
|
||||
@ -188,7 +188,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_service_food_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_service_food"
|
||||
})
|
||||
@ -210,7 +210,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_service_lodging_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_service_lodging"
|
||||
})
|
||||
@ -232,7 +232,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_service_ev_charging_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_service_ev_charging"
|
||||
})
|
||||
|
@ -1,21 +1,21 @@
|
||||
-- Class-M signs
|
||||
|
||||
local S = street_signs.gettext
|
||||
local S = signs_lib.gettext
|
||||
local cbox
|
||||
|
||||
for _, onpole in ipairs({"", "_onpole"}) do
|
||||
|
||||
local nci = nil
|
||||
local on_rotate = street_signs.wallmounted_rotate
|
||||
local on_rotate = signs_lib.wallmounted_rotate
|
||||
local pole_mount_tex = nil
|
||||
|
||||
if onpole == "_onpole" then
|
||||
nci = 1
|
||||
on_rotate = nil
|
||||
pole_mount_tex = "street_signs_pole_mount.png"
|
||||
pole_mount_tex = "signs_lib_pole_mount.png"
|
||||
end
|
||||
|
||||
cbox = street_signs.make_selection_boxes(36, 36, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(36, 36, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_us_route"..onpole, {
|
||||
description = "M1-4: Generic \"US Route\" sign",
|
||||
@ -34,11 +34,11 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_us_route_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
after_place_node = street_signs.after_place_node,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = on_rotate,
|
||||
number_of_lines = 1,
|
||||
horiz_scaling = 3.5,
|
||||
@ -50,7 +50,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
chars_per_line = 3,
|
||||
entity_info = {
|
||||
mesh = "street_signs_generic_sign_36x36_entity"..onpole..".obj",
|
||||
yaw = street_signs.wallmounted_yaw
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_us_route"
|
||||
})
|
||||
@ -72,11 +72,11 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_us_interstate_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "f",
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
after_place_node = street_signs.after_place_node,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = on_rotate,
|
||||
number_of_lines = 1,
|
||||
horiz_scaling = 4.3,
|
||||
@ -88,12 +88,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
chars_per_line = 3,
|
||||
entity_info = {
|
||||
mesh = "street_signs_interstate_shield_entity"..onpole..".obj",
|
||||
yaw = street_signs.wallmounted_yaw
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_us_interstate"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(48, 18, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(48, 18, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_detour_right_m4_10"..onpole, {
|
||||
description = "M4-10: Detour sign (to right)",
|
||||
@ -112,7 +112,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_detour_right_m4_10_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_detour_right_m4_10"
|
||||
})
|
||||
@ -134,11 +134,11 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_detour_left_m4_10_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_detour_left_m4_10"
|
||||
})
|
||||
|
||||
table.insert(street_signs.lbm_restore_nodes, "street_signs:sign_us_route"..onpole)
|
||||
table.insert(street_signs.lbm_restore_nodes, "street_signs:sign_us_interstate"..onpole)
|
||||
table.insert(signs_lib.lbm_restore_nodes, "street_signs:sign_us_route"..onpole)
|
||||
table.insert(signs_lib.lbm_restore_nodes, "street_signs:sign_us_interstate"..onpole)
|
||||
end
|
||||
|
@ -1,11 +1,11 @@
|
||||
-- Class-OM signs
|
||||
|
||||
local S = street_signs.gettext
|
||||
local S = signs_lib.gettext
|
||||
local cbox
|
||||
|
||||
for _, d in ipairs({"l", "c", "r"}) do
|
||||
|
||||
cbox = street_signs.make_selection_boxes(12, 36, nil)
|
||||
cbox = signs_lib.make_selection_boxes(12, 36, nil)
|
||||
|
||||
minetest.register_node("street_signs:sign_object_marker_type3_"..d, {
|
||||
description = "OM3-"..string.upper(d)..": Type 3 object marker",
|
||||
|
@ -1,21 +1,21 @@
|
||||
-- Class-R signs
|
||||
|
||||
local S = street_signs.gettext
|
||||
local S = signs_lib.gettext
|
||||
local cbox
|
||||
|
||||
for _, onpole in ipairs({"", "_onpole"}) do
|
||||
|
||||
local nci = nil
|
||||
local on_rotate = street_signs.wallmounted_rotate
|
||||
local on_rotate = signs_lib.wallmounted_rotate
|
||||
local pole_mount_tex = nil
|
||||
|
||||
if onpole == "_onpole" then
|
||||
nci = 1
|
||||
on_rotate = nil
|
||||
pole_mount_tex = "street_signs_pole_mount.png"
|
||||
pole_mount_tex = "signs_lib_pole_mount.png"
|
||||
end
|
||||
|
||||
cbox = street_signs.make_selection_boxes(36, 36, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(36, 36, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_stop"..onpole, {
|
||||
description = "R1-1: Stop sign",
|
||||
@ -34,12 +34,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_stop_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_stop"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(36, 43.1, onpole, 0, -3.55, 0)
|
||||
cbox = signs_lib.make_selection_boxes(36, 43.1, onpole, 0, -3.55, 0)
|
||||
|
||||
minetest.register_node("street_signs:sign_stop_all_way"..onpole, {
|
||||
description = "R1-1 + R1-3P: Stop sign with \"all way\" plaque",
|
||||
@ -59,12 +59,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_stop_all_way_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_stop_all_way"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(48, 48, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(48, 48, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_yield"..onpole, {
|
||||
description = "R1-2: Yield sign",
|
||||
@ -83,12 +83,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_yield_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_yield"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(30, 36, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(30, 36, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_speed_limit"..onpole, {
|
||||
description = "R2-1: Generic speed limit sign",
|
||||
@ -107,11 +107,11 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_speed_limit_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
after_place_node = street_signs.after_place_node,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = on_rotate,
|
||||
number_of_lines = 1,
|
||||
horiz_scaling = 2.65,
|
||||
@ -123,12 +123,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
chars_per_line = 4,
|
||||
entity_info = {
|
||||
mesh = "street_signs_generic_sign_30x36_entity"..onpole..".obj",
|
||||
yaw = street_signs.wallmounted_yaw
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_speed_limit"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(36, 36, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(36, 36, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_no_right_turn"..onpole, {
|
||||
description = "R3-1: No right turn",
|
||||
@ -147,7 +147,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_no_right_turn_inv.png",
|
||||
wield_image = "street_signs_no_right_turn_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_no_right_turn"
|
||||
})
|
||||
@ -169,7 +169,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_no_left_turn_inv.png",
|
||||
wield_image = "street_signs_no_left_turn_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_no_left_turn"
|
||||
})
|
||||
@ -191,7 +191,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_no_u_turn_inv.png",
|
||||
wield_image = "street_signs_no_u_turn_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_no_u_turn"
|
||||
})
|
||||
@ -213,12 +213,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_u_turn_here_inv.png",
|
||||
wield_image = "street_signs_u_turn_here_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_u_turn_here"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(30, 36, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(30, 36, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_left_turn_only"..onpole, {
|
||||
description = "R3-5: Left turn only",
|
||||
@ -237,7 +237,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_left_turn_only_inv.png",
|
||||
wield_image = "street_signs_left_turn_only_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_left_turn_only"
|
||||
})
|
||||
@ -259,7 +259,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_right_turn_only_inv.png",
|
||||
wield_image = "street_signs_right_turn_only_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_right_turn_only"
|
||||
})
|
||||
@ -281,7 +281,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_straight_through_only_inv.png",
|
||||
wield_image = "street_signs_straight_through_only_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_straight_through_only"
|
||||
})
|
||||
@ -303,7 +303,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_left_turn_or_straight_inv.png",
|
||||
wield_image = "street_signs_left_turn_or_straight_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_left_turn_or_straight"
|
||||
})
|
||||
@ -325,13 +325,13 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_right_turn_or_straight_inv.png",
|
||||
wield_image = "street_signs_right_turn_or_straight_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_right_turn_or_straight"
|
||||
})
|
||||
|
||||
|
||||
cbox = street_signs.make_selection_boxes(36, 36, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(36, 36, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_left_lane_must_turn_left"..onpole, {
|
||||
description = "R3-7: Left lane must turn left",
|
||||
@ -350,7 +350,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_left_lane_must_turn_left_inv.png",
|
||||
wield_image = "street_signs_left_lane_must_turn_left_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_left_lane_must_turn_left"
|
||||
})
|
||||
@ -372,7 +372,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_right_lane_must_turn_right_inv.png",
|
||||
wield_image = "street_signs_right_lane_must_turn_right_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_right_lane_must_turn_right"
|
||||
})
|
||||
@ -394,12 +394,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_no_straight_through_inv.png",
|
||||
wield_image = "street_signs_no_straight_through_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_no_straight_through"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(36, 48, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(36, 48, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_keep_right"..onpole, {
|
||||
description = "R4-7: Keep right sign",
|
||||
@ -417,7 +417,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_keep_right_inv.png",
|
||||
wield_image = "street_signs_keep_right_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_keep_right"
|
||||
})
|
||||
@ -438,12 +438,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_keep_left_inv.png",
|
||||
wield_image = "street_signs_keep_left_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_keep_left"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(36, 36, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(36, 36, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_do_not_enter"..onpole, {
|
||||
description = "R5-1: Do not enter sign",
|
||||
@ -462,12 +462,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_do_not_enter_inv.png",
|
||||
wield_image = "street_signs_do_not_enter_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_do_not_enter"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(42, 30, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(42, 30, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_wrong_way"..onpole, {
|
||||
description = "R5-1a: Wrong way sign",
|
||||
@ -485,12 +485,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_wrong_way_inv.png",
|
||||
wield_image = "street_signs_wrong_way_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_wrong_way"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(54, 18, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(54, 18, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_one_way_left"..onpole, {
|
||||
description = "R6-1: One way (left)",
|
||||
@ -508,7 +508,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_one_way_left_inv.png",
|
||||
wield_image = "street_signs_one_way_left_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_one_way_left"
|
||||
})
|
||||
@ -529,12 +529,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_one_way_right_inv.png",
|
||||
wield_image = "street_signs_one_way_right_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_one_way_right"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(30, 24, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(30, 24, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_divided_highway_with_cross_road"..onpole, {
|
||||
description = "R6-3: divided highway with cross road",
|
||||
@ -552,12 +552,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_divided_highway_with_cross_road_inv.png",
|
||||
wield_image = "street_signs_divided_highway_with_cross_road_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_divided_highway_with_cross_road"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(60, 24, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(60, 24, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_roundabout_directional"..onpole, {
|
||||
description = "R6-4b: Roundabout direction (4 chevrons)",
|
||||
@ -575,7 +575,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_roundabout_directional_inv.png",
|
||||
wield_image = "street_signs_roundabout_directional.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_roundabout_directional"
|
||||
})
|
||||
@ -596,12 +596,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_roundabout_directional_left_inv.png",
|
||||
wield_image = "street_signs_roundabout_directional_left.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_roundabout_directional_left"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(30, 30, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(30, 30, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_roundabout_counter_clockwise"..onpole, {
|
||||
description = "R6-5P: Roundabout plaque (to the left/counter-clockwise)",
|
||||
@ -619,7 +619,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_roundabout_counter_clockwise_inv.png",
|
||||
wield_image = "street_signs_roundabout_counter_clockwise.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_roundabout_counter_clockwise"
|
||||
})
|
||||
@ -640,12 +640,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_roundabout_clockwise_inv.png",
|
||||
wield_image = "street_signs_roundabout_clockwise.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_roundabout_clockwise"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(24, 30, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(24, 30, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_do_not_stop_on_tracks"..onpole, {
|
||||
description = "R8-8: Do not stop on tracks",
|
||||
@ -664,12 +664,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_do_not_stop_on_tracks.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_do_not_stop_on_tracks"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(9, 15, onpole, 0, 0, -1.25)
|
||||
cbox = signs_lib.make_selection_boxes(9, 15, onpole, 0, 0, -1.25)
|
||||
|
||||
minetest.register_node("street_signs:sign_ped_push_button_to_cross_r10_3a"..onpole, {
|
||||
description = "R10-3a: Pedestrians, push button to cross (pointing left)",
|
||||
@ -688,7 +688,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_ped_push_button_to_cross_r10_3a_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_ped_push_button_to_cross_r10_3a"
|
||||
})
|
||||
@ -710,7 +710,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_ped_push_button_to_cross_r10_3a_right_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_ped_push_button_to_cross_r10_3a_right"
|
||||
})
|
||||
@ -732,7 +732,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_ped_push_button_to_cross_r10_3a_both_ways_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_ped_push_button_to_cross_r10_3a_both_ways"
|
||||
})
|
||||
@ -754,7 +754,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_ped_push_button_to_cross_r10_3e_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_ped_push_button_to_cross_r10_3e"
|
||||
})
|
||||
@ -776,7 +776,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_ped_push_button_to_cross_r10_3e_left_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_ped_push_button_to_cross_r10_3e_left"
|
||||
})
|
||||
@ -798,11 +798,11 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_ped_push_button_to_cross_r10_3i_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
after_place_node = street_signs.after_place_node,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = on_rotate,
|
||||
number_of_lines = 1,
|
||||
horiz_scaling = 3,
|
||||
@ -814,7 +814,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
chars_per_line = 25,
|
||||
entity_info = {
|
||||
mesh = "street_signs_generic_sign_9x15_entity"..onpole..".obj",
|
||||
yaw = street_signs.wallmounted_yaw
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_ped_push_button_to_cross_r10_3i"
|
||||
})
|
||||
@ -836,11 +836,11 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_ped_push_button_to_cross_r10_3i_left_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
after_place_node = street_signs.after_place_node,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = on_rotate,
|
||||
number_of_lines = 1,
|
||||
horiz_scaling = 3,
|
||||
@ -852,12 +852,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
chars_per_line = 25,
|
||||
entity_info = {
|
||||
mesh = "street_signs_generic_sign_9x15_entity"..onpole..".obj",
|
||||
yaw = street_signs.wallmounted_yaw
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_ped_push_button_to_cross_r10_3i_left"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(30, 36, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(30, 36, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_left_on_green_arrow_only"..onpole, {
|
||||
description = "R10-5: Left on green arrow only sign",
|
||||
@ -875,12 +875,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_left_on_green_arrow_only_inv.png",
|
||||
wield_image = "street_signs_left_on_green_arrow_only_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_left_on_green_arrow_only"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(24, 36, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(24, 36, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_stop_here_on_red"..onpole, {
|
||||
description = "R10-6: Stop here on red sign",
|
||||
@ -898,12 +898,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_stop_here_on_red_inv.png",
|
||||
wield_image = "street_signs_stop_here_on_red_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_stop_here_on_red"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(36, 42, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(36, 42, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_use_lane_with_green_arrow"..onpole, {
|
||||
description = "R10-8: Use lane with green arrow",
|
||||
@ -921,12 +921,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_use_lane_with_green_arrow_inv.png",
|
||||
wield_image = "street_signs_use_lane_with_green_arrow_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:use_lane_with_green_arrow"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(36, 48, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(36, 48, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_no_turn_on_red_light"..onpole, {
|
||||
description = "R10-11: No turn on red light",
|
||||
@ -944,12 +944,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_no_turn_on_red_light_inv.png",
|
||||
wield_image = "street_signs_no_turn_on_red_light_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:no_turn_on_red_light"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(30, 36, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(30, 36, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_left_turn_yield_on_green_light"..onpole, {
|
||||
description = "R10-12: Left turn yield on green light",
|
||||
@ -967,12 +967,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_left_turn_yield_on_green_light_inv.png",
|
||||
wield_image = "street_signs_left_turn_yield_on_green_light_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_left_turn_yield_on_green_light"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(24, 30, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(24, 30, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_crosswalk_stop_on_red_light"..onpole, {
|
||||
description = "R10-23: Crosswalk: stop on red light",
|
||||
@ -990,12 +990,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_crosswalk_stop_on_red_light_inv.png",
|
||||
wield_image = "street_signs_crosswalk_stop_on_red_light_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_crosswalk_stop_on_red_light"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(9, 12, onpole, 0, 0, -1.25)
|
||||
cbox = signs_lib.make_selection_boxes(9, 12, onpole, 0, 0, -1.25)
|
||||
|
||||
minetest.register_node("street_signs:sign_ped_push_button_to_turn_on_warning_lights"..onpole, {
|
||||
description = "R10-25: Pedestrians, push button to turn on warning lights",
|
||||
@ -1014,12 +1014,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_ped_push_button_to_turn_on_warning_lights_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_ped_push_button_to_turn_on_warning_lights"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(41, 41, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(41, 41, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_rr_grade_crossbuck"..onpole, {
|
||||
description = "R15-1: Railroad grade crossing (crossbuck)",
|
||||
@ -1037,12 +1037,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
inventory_image = "street_signs_rr_grade_crossbuck_inv.png",
|
||||
wield_image = "street_signs_rr_grade_crossbuck_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_rr_grade_crossbuck"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(24, 12, onpole, 0, 12, 0)
|
||||
cbox = signs_lib.make_selection_boxes(24, 12, onpole, 0, 12, 0)
|
||||
|
||||
minetest.register_node("street_signs:sign_rr_exempt_r15_3p"..onpole, {
|
||||
description = "R15-3P: Railroad \"EXEMPT\" sign (white)",
|
||||
@ -1061,15 +1061,15 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_rr_exempt_r15_3p_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_rr_exempt_r15_3p"
|
||||
})
|
||||
|
||||
|
||||
table.insert(street_signs.lbm_restore_nodes, "street_signs:sign_ped_push_button_to_cross_r10_3i"..onpole)
|
||||
table.insert(street_signs.lbm_restore_nodes, "street_signs:sign_ped_push_button_to_cross_r10_3i_left"..onpole)
|
||||
table.insert(street_signs.lbm_restore_nodes, "street_signs:sign_speed_limit"..onpole)
|
||||
table.insert(signs_lib.lbm_restore_nodes, "street_signs:sign_ped_push_button_to_cross_r10_3i"..onpole)
|
||||
table.insert(signs_lib.lbm_restore_nodes, "street_signs:sign_ped_push_button_to_cross_r10_3i_left"..onpole)
|
||||
table.insert(signs_lib.lbm_restore_nodes, "street_signs:sign_speed_limit"..onpole)
|
||||
end
|
||||
|
||||
cbox = {
|
||||
|
@ -1,21 +1,21 @@
|
||||
-- Class-W signs
|
||||
|
||||
local S = street_signs.gettext
|
||||
local S = signs_lib.gettext
|
||||
local cbox
|
||||
|
||||
for _, onpole in ipairs({"", "_onpole"}) do
|
||||
|
||||
local nci = nil
|
||||
local on_rotate = street_signs.wallmounted_rotate
|
||||
local on_rotate = signs_lib.wallmounted_rotate
|
||||
local pole_mount_tex = nil
|
||||
|
||||
if onpole == "_onpole" then
|
||||
nci = 1
|
||||
on_rotate = nil
|
||||
pole_mount_tex = "street_signs_pole_mount.png"
|
||||
pole_mount_tex = "signs_lib_pole_mount.png"
|
||||
end
|
||||
|
||||
cbox = street_signs.make_selection_boxes(36, 36, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(36, 36, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_road_turns_sharp_left"..onpole, {
|
||||
description = "W1-1: Road turns, sharp left ahead",
|
||||
@ -34,7 +34,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_road_turns_sharp_left_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_road_turns_sharp_left"
|
||||
})
|
||||
@ -56,7 +56,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_road_turns_sharp_right_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_road_turns_sharp_right"
|
||||
})
|
||||
@ -78,7 +78,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_road_turns_left_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_road_turns_left"
|
||||
})
|
||||
@ -100,7 +100,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_road_turns_right_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_road_turns_right"
|
||||
})
|
||||
@ -122,7 +122,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_road_turns_dog_leg_left_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_road_turns_dog_leg_left"
|
||||
})
|
||||
@ -144,7 +144,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_road_turns_dog_leg_right_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_road_turns_dog_leg_right"
|
||||
})
|
||||
@ -166,7 +166,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_road_turns_dog_leg_curve_left_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_road_turns_dog_leg_curve_left"
|
||||
})
|
||||
@ -188,7 +188,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_road_turns_dog_leg_curve_right_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_road_turns_dog_leg_curve_right"
|
||||
})
|
||||
@ -210,7 +210,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_road_winding_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_road_winding"
|
||||
})
|
||||
@ -232,7 +232,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_road_turns_hairpin_left_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_road_turns_hairpin_left"
|
||||
})
|
||||
@ -254,7 +254,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_road_turns_hairpin_right_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_road_turns_hairpin_right"
|
||||
})
|
||||
@ -276,7 +276,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_road_turns_270_left_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_road_turns_270_left"
|
||||
})
|
||||
@ -298,12 +298,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_road_turns_270_right_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_road_turns_270_right"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(48, 24, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(48, 24, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_large_arrow_left"..onpole, {
|
||||
description = "W1-6: Large arrow pointing left",
|
||||
@ -322,7 +322,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_large_arrow_left_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_large_arrow_left"
|
||||
})
|
||||
@ -344,7 +344,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_large_arrow_right_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_large_arrow_right"
|
||||
})
|
||||
@ -366,12 +366,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_two_direction_large_arrow_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_two_direction_large_arrow"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(36, 36, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(36, 36, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_cross_road_ahead"..onpole, {
|
||||
description = "W2-1: Cross-road ahead",
|
||||
@ -390,7 +390,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_cross_road_ahead_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_cross_road_ahead"
|
||||
})
|
||||
@ -412,7 +412,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_side_road_right_ahead_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_side_road_right_ahead"
|
||||
})
|
||||
@ -434,7 +434,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_side_road_left_ahead_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_side_road_left_ahead"
|
||||
})
|
||||
@ -456,7 +456,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_t_junction_ahead_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_t_junction_ahead"
|
||||
})
|
||||
@ -478,7 +478,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_circular_intersection_ahead_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_circular_intersection_ahead"
|
||||
})
|
||||
@ -500,7 +500,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_offset_side_road_left_ahead_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_offset_side_road_left_ahead"
|
||||
})
|
||||
@ -522,7 +522,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_offset_side_road_right_ahead_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_offset_side_road_right_ahead"
|
||||
})
|
||||
@ -544,7 +544,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_stop_ahead_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_stop_ahead"
|
||||
})
|
||||
@ -566,7 +566,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_yield_ahead_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_yield_ahead"
|
||||
})
|
||||
@ -588,7 +588,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_signal_ahead_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_signal_ahead"
|
||||
})
|
||||
@ -610,7 +610,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_merging_traffic_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_merging_traffic"
|
||||
})
|
||||
@ -632,7 +632,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_left_lane_ends_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_left_lane_ends"
|
||||
})
|
||||
@ -654,7 +654,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_right_lane_ends_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_right_lane_ends"
|
||||
})
|
||||
@ -676,7 +676,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_divided_highway_begins_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_divided_highway_begins"
|
||||
})
|
||||
@ -698,7 +698,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_divided_highway_ends_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_divided_highway_ends"
|
||||
})
|
||||
@ -720,7 +720,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_two_way_traffic_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_two_way_traffic"
|
||||
})
|
||||
@ -742,11 +742,11 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_hill_with_grade_ahead_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
after_place_node = street_signs.after_place_node,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = on_rotate,
|
||||
number_of_lines = 1,
|
||||
horiz_scaling = 1.9,
|
||||
@ -758,12 +758,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
chars_per_line = 15,
|
||||
entity_info = {
|
||||
mesh = "street_signs_warning_36x36_entity"..onpole..".obj",
|
||||
yaw = street_signs.wallmounted_yaw
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_hill_with_grade_ahead"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(24, 18, onpole, 0, 9.75, 0)
|
||||
cbox = signs_lib.make_selection_boxes(24, 18, onpole, 0, 9.75, 0)
|
||||
|
||||
minetest.register_node("street_signs:sign_distance_2_lines"..onpole, {
|
||||
description = "W7-3aP: Blank distance sign (like \"Next X Miles\", 2 lines, yellow)",
|
||||
@ -782,11 +782,11 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_distance_2_lines_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
after_place_node = street_signs.after_place_node,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = on_rotate,
|
||||
number_of_lines = 2,
|
||||
horiz_scaling = 1.8,
|
||||
@ -798,7 +798,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
chars_per_line = 20,
|
||||
entity_info = {
|
||||
mesh = "street_signs_generic_sign_24x18_top_entity"..onpole..".obj",
|
||||
yaw = street_signs.wallmounted_yaw
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_distance_2_lines"
|
||||
})
|
||||
@ -820,11 +820,11 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_distance_2_lines_orange_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
after_place_node = street_signs.after_place_node,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = on_rotate,
|
||||
number_of_lines = 2,
|
||||
horiz_scaling = 1.8,
|
||||
@ -836,13 +836,13 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
chars_per_line = 20,
|
||||
entity_info = {
|
||||
mesh = "street_signs_generic_sign_24x18_top_entity"..onpole..".obj",
|
||||
yaw = street_signs.wallmounted_yaw
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_distance_2_lines_orange"
|
||||
})
|
||||
|
||||
|
||||
cbox = street_signs.make_selection_boxes(30, 30, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(30, 30, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_rr_grade_crossing_advance"..onpole, {
|
||||
description = "W10-1: Railroad grade crossing advance warning",
|
||||
@ -861,12 +861,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_rr_grade_crossing_advance_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_rr_grade_crossing_advance"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(24, 12, onpole, 0, 12, 0)
|
||||
cbox = signs_lib.make_selection_boxes(24, 12, onpole, 0, 12, 0)
|
||||
|
||||
minetest.register_node("street_signs:sign_rr_exempt_w10_1ap"..onpole, {
|
||||
description = "W10-1aP: Railroad \"EXEMPT\" sign (yellow)",
|
||||
@ -885,12 +885,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_rr_exempt_w10_1ap_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_rr_exempt_w10_1ap"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(36, 36, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(36, 36, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_pedestrian_crossing"..onpole, {
|
||||
description = "W11-2: Pedestrian crossing sign",
|
||||
@ -909,7 +909,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_pedestrian_crossing_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
after_place_node = street_signs.after_place_node,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_rotate = on_rotate,
|
||||
drop = "street_signs:sign_pedestrian_crossing"
|
||||
})
|
||||
@ -931,11 +931,11 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_low_clearance_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
after_place_node = street_signs.after_place_node,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = on_rotate,
|
||||
number_of_lines = 1,
|
||||
horiz_scaling = 1.3,
|
||||
@ -947,12 +947,12 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
chars_per_line = 15,
|
||||
entity_info = {
|
||||
mesh = "street_signs_warning_36x36_entity"..onpole..".obj",
|
||||
yaw = street_signs.wallmounted_yaw
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_low_clearance"
|
||||
})
|
||||
|
||||
cbox = street_signs.make_selection_boxes(18, 18, onpole, 0, 10, 0)
|
||||
cbox = signs_lib.make_selection_boxes(18, 18, onpole, 0, 10, 0)
|
||||
|
||||
minetest.register_node("street_signs:sign_advisory_speed_mph"..onpole, {
|
||||
description = "W13-1P: Advisory speed (MPH)",
|
||||
@ -971,11 +971,11 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_advisory_speed_mph_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
after_place_node = street_signs.after_place_node,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = on_rotate,
|
||||
number_of_lines = 1,
|
||||
horiz_scaling = 1.25,
|
||||
@ -987,7 +987,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
chars_per_line = 8,
|
||||
entity_info = {
|
||||
mesh = "street_signs_generic_sign_18x18_top_entity"..onpole..".obj",
|
||||
yaw = street_signs.wallmounted_yaw
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_advisory_speed_mph"
|
||||
})
|
||||
@ -1009,11 +1009,11 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_advisory_speed_kmh_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
after_place_node = street_signs.after_place_node,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = on_rotate,
|
||||
number_of_lines = 1,
|
||||
horiz_scaling = 1.25,
|
||||
@ -1025,7 +1025,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
chars_per_line = 8,
|
||||
entity_info = {
|
||||
mesh = "street_signs_generic_sign_18x18_top_entity"..onpole..".obj",
|
||||
yaw = street_signs.wallmounted_yaw
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_advisory_speed_kmh"
|
||||
})
|
||||
@ -1047,11 +1047,11 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_advisory_speed_ms_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
after_place_node = street_signs.after_place_node,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = on_rotate,
|
||||
number_of_lines = 1,
|
||||
horiz_scaling = 1.25,
|
||||
@ -1063,15 +1063,15 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
chars_per_line = 8,
|
||||
entity_info = {
|
||||
mesh = "street_signs_generic_sign_18x18_top_entity"..onpole..".obj",
|
||||
yaw = street_signs.wallmounted_yaw
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_advisory_speed_ms"
|
||||
})
|
||||
|
||||
table.insert(street_signs.lbm_restore_nodes, "street_signs:sign_hill_with_grade_ahead"..onpole)
|
||||
table.insert(street_signs.lbm_restore_nodes, "street_signs:sign_low_clearance"..onpole)
|
||||
table.insert(street_signs.lbm_restore_nodes, "street_signs:sign_distance_2_lines"..onpole)
|
||||
table.insert(street_signs.lbm_restore_nodes, "street_signs:sign_advisory_speed_mph"..onpole)
|
||||
table.insert(street_signs.lbm_restore_nodes, "street_signs:sign_advisory_speed_kmh"..onpole)
|
||||
table.insert(street_signs.lbm_restore_nodes, "street_signs:sign_advisory_speed_ms"..onpole)
|
||||
table.insert(signs_lib.lbm_restore_nodes, "street_signs:sign_hill_with_grade_ahead"..onpole)
|
||||
table.insert(signs_lib.lbm_restore_nodes, "street_signs:sign_low_clearance"..onpole)
|
||||
table.insert(signs_lib.lbm_restore_nodes, "street_signs:sign_distance_2_lines"..onpole)
|
||||
table.insert(signs_lib.lbm_restore_nodes, "street_signs:sign_advisory_speed_mph"..onpole)
|
||||
table.insert(signs_lib.lbm_restore_nodes, "street_signs:sign_advisory_speed_kmh"..onpole)
|
||||
table.insert(signs_lib.lbm_restore_nodes, "street_signs:sign_advisory_speed_ms"..onpole)
|
||||
end
|
||||
|
@ -1,21 +1,21 @@
|
||||
-- Misc./Generic signs
|
||||
|
||||
local S = street_signs.gettext
|
||||
local S = signs_lib.gettext
|
||||
local cbox
|
||||
|
||||
for _, onpole in ipairs({"", "_onpole"}) do
|
||||
|
||||
local nci = nil
|
||||
local on_rotate = street_signs.wallmounted_rotate
|
||||
local on_rotate = signs_lib.wallmounted_rotate
|
||||
local pole_mount_tex = nil
|
||||
|
||||
if onpole == "_onpole" then
|
||||
nci = 1
|
||||
on_rotate = nil
|
||||
pole_mount_tex = "street_signs_pole_mount.png"
|
||||
pole_mount_tex = "signs_lib_pole_mount.png"
|
||||
end
|
||||
|
||||
cbox = street_signs.make_selection_boxes(36, 36, onpole)
|
||||
cbox = signs_lib.make_selection_boxes(36, 36, onpole)
|
||||
|
||||
minetest.register_node("street_signs:sign_warning_3_line"..onpole, {
|
||||
description = "W3-4: Generic US diamond \"warning\" sign (3-line, yellow)",
|
||||
@ -34,11 +34,11 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_warning_3_line_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
after_place_node = street_signs.after_place_node,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = on_rotate,
|
||||
number_of_lines = 3,
|
||||
horiz_scaling = 1.75,
|
||||
@ -50,7 +50,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
chars_per_line = 15,
|
||||
entity_info = {
|
||||
mesh = "street_signs_warning_36x36_entity"..onpole..".obj",
|
||||
yaw = street_signs.wallmounted_yaw
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_warning_3_line"
|
||||
})
|
||||
@ -72,11 +72,11 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_warning_4_line_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
after_place_node = street_signs.after_place_node,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = on_rotate,
|
||||
number_of_lines = 4,
|
||||
horiz_scaling = 1.75,
|
||||
@ -88,7 +88,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
chars_per_line = 15,
|
||||
entity_info = {
|
||||
mesh = "street_signs_warning_36x36_entity"..onpole..".obj",
|
||||
yaw = street_signs.wallmounted_yaw
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_warning_4_line"
|
||||
})
|
||||
@ -110,11 +110,11 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_warning_orange_3_line_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
after_place_node = street_signs.after_place_node,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = on_rotate,
|
||||
number_of_lines = 3,
|
||||
horiz_scaling = 1.75,
|
||||
@ -126,7 +126,7 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
chars_per_line = 15,
|
||||
entity_info = {
|
||||
mesh = "street_signs_warning_36x36_entity"..onpole..".obj",
|
||||
yaw = street_signs.wallmounted_yaw
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_warning_orange_3_line"
|
||||
})
|
||||
@ -148,11 +148,11 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
wield_image = "street_signs_warning_orange_4_line_inv.png",
|
||||
groups = {choppy=2, dig_immediate=2, not_in_creative_inventory = nci},
|
||||
default_color = "0",
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
after_place_node = street_signs.after_place_node,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
after_place_node = signs_lib.after_place_node,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = on_rotate,
|
||||
number_of_lines = 4,
|
||||
horiz_scaling = 1.75,
|
||||
@ -164,15 +164,15 @@ for _, onpole in ipairs({"", "_onpole"}) do
|
||||
chars_per_line = 15,
|
||||
entity_info = {
|
||||
mesh = "street_signs_warning_36x36_entity"..onpole..".obj",
|
||||
yaw = street_signs.wallmounted_yaw
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_warning_orange_4_line"
|
||||
})
|
||||
|
||||
table.insert(street_signs.lbm_restore_nodes, "street_signs:sign_warning_3_line"..onpole)
|
||||
table.insert(street_signs.lbm_restore_nodes, "street_signs:sign_warning_4_line"..onpole)
|
||||
table.insert(street_signs.lbm_restore_nodes, "street_signs:sign_warning_orange_3_line"..onpole)
|
||||
table.insert(street_signs.lbm_restore_nodes, "street_signs:sign_warning_orange_4_line"..onpole)
|
||||
table.insert(signs_lib.lbm_restore_nodes, "street_signs:sign_warning_3_line"..onpole)
|
||||
table.insert(signs_lib.lbm_restore_nodes, "street_signs:sign_warning_4_line"..onpole)
|
||||
table.insert(signs_lib.lbm_restore_nodes, "street_signs:sign_warning_orange_3_line"..onpole)
|
||||
table.insert(signs_lib.lbm_restore_nodes, "street_signs:sign_warning_orange_4_line"..onpole)
|
||||
end
|
||||
|
||||
for _, s in ipairs(street_signs.big_sign_sizes) do
|
||||
@ -211,11 +211,11 @@ for _, s in ipairs(street_signs.big_sign_sizes) do
|
||||
},
|
||||
default_color = defc,
|
||||
groups = {choppy=2, dig_immediate=2},
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_rotate = street_signs.wallmounted_rotate,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = signs_lib.wallmounted_rotate,
|
||||
number_of_lines = nlines,
|
||||
chars_per_line = nchars,
|
||||
horiz_scaling = hscale,
|
||||
@ -226,7 +226,7 @@ for _, s in ipairs(street_signs.big_sign_sizes) do
|
||||
y_offset = yoffs,
|
||||
entity_info = {
|
||||
mesh = "street_signs_generic_highway_"..size.."_entity.obj",
|
||||
yaw = street_signs.wallmounted_yaw
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
}
|
||||
})
|
||||
|
||||
@ -248,11 +248,11 @@ for _, s in ipairs(street_signs.big_sign_sizes) do
|
||||
},
|
||||
default_color = defc,
|
||||
groups = {choppy=2, dig_immediate=2},
|
||||
on_construct = street_signs.construct_sign,
|
||||
on_destruct = street_signs.destruct_sign,
|
||||
on_receive_fields = street_signs.receive_fields,
|
||||
on_punch = street_signs.update_sign,
|
||||
on_rotate = street_signs.wallmounted_rotate,
|
||||
on_construct = signs_lib.construct_sign,
|
||||
on_destruct = signs_lib.destruct_sign,
|
||||
on_receive_fields = signs_lib.receive_fields,
|
||||
on_punch = signs_lib.update_sign,
|
||||
on_rotate = signs_lib.wallmounted_rotate,
|
||||
number_of_lines = nlines,
|
||||
chars_per_line = math.ceil(nchars/1.4),
|
||||
horiz_scaling = hscale/1.4,
|
||||
@ -263,12 +263,12 @@ for _, s in ipairs(street_signs.big_sign_sizes) do
|
||||
y_offset = yoffs,
|
||||
entity_info = {
|
||||
mesh = "street_signs_generic_highway_"..size.."_entity.obj",
|
||||
yaw = street_signs.wallmounted_yaw
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
}
|
||||
})
|
||||
|
||||
table.insert(street_signs.lbm_restore_nodes, "street_signs:sign_highway_"..size.."_"..color)
|
||||
table.insert(street_signs.lbm_restore_nodes, "street_signs:sign_highway_widefont_"..size.."_"..color)
|
||||
table.insert(signs_lib.lbm_restore_nodes, "street_signs:sign_highway_"..size.."_"..color)
|
||||
table.insert(signs_lib.lbm_restore_nodes, "street_signs:sign_highway_widefont_"..size.."_"..color)
|
||||
|
||||
end
|
||||
end
|
||||
|
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 109 B |
Before Width: | Height: | Size: 109 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 355 B |
Before Width: | Height: | Size: 355 B |
Before Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 67 B |
Before Width: | Height: | Size: 83 B |
Before Width: | Height: | Size: 83 B |
Before Width: | Height: | Size: 97 B |
Before Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 125 B |
Before Width: | Height: | Size: 120 B |
Before Width: | Height: | Size: 78 B |
Before Width: | Height: | Size: 88 B |
Before Width: | Height: | Size: 88 B |
Before Width: | Height: | Size: 90 B |
Before Width: | Height: | Size: 84 B |
Before Width: | Height: | Size: 79 B |
Before Width: | Height: | Size: 77 B |
Before Width: | Height: | Size: 77 B |
Before Width: | Height: | Size: 93 B |
Before Width: | Height: | Size: 97 B |
Before Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 113 B |
Before Width: | Height: | Size: 109 B |
Before Width: | Height: | Size: 103 B |
Before Width: | Height: | Size: 109 B |
Before Width: | Height: | Size: 104 B |
Before Width: | Height: | Size: 95 B |
Before Width: | Height: | Size: 104 B |
Before Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 77 B |
Before Width: | Height: | Size: 80 B |
Before Width: | Height: | Size: 96 B |
Before Width: | Height: | Size: 80 B |
Before Width: | Height: | Size: 95 B |
Before Width: | Height: | Size: 102 B |
Before Width: | Height: | Size: 128 B |
Before Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 97 B |
Before Width: | Height: | Size: 113 B |
Before Width: | Height: | Size: 104 B |
Before Width: | Height: | Size: 92 B |
Before Width: | Height: | Size: 91 B |
Before Width: | Height: | Size: 118 B |
Before Width: | Height: | Size: 89 B |
Before Width: | Height: | Size: 77 B |
Before Width: | Height: | Size: 91 B |
Before Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 82 B |
Before Width: | Height: | Size: 108 B |
Before Width: | Height: | Size: 103 B |
Before Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 99 B |
Before Width: | Height: | Size: 122 B |
Before Width: | Height: | Size: 100 B |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 95 B |
Before Width: | Height: | Size: 103 B |