2018-09-24 19:37:29 -04:00
|
|
|
-- This mod provides your standard green street name signs
|
|
|
|
-- (that is, the two-up, 2m high ones identifying street intersections),
|
2018-09-29 18:37:04 -04:00
|
|
|
-- the larger kind found above or alongside highways,
|
|
|
|
-- and a selection of other kinds of signs like stop, pedestrian crossing,
|
|
|
|
-- yield, US Route, and so on (all from MUTCD 2009 R2)
|
2018-09-24 19:37:29 -04:00
|
|
|
--
|
2018-09-21 01:43:32 -04:00
|
|
|
-- forked from signs_lib by Diego Martinez et. al
|
2016-03-14 19:03:44 -03:00
|
|
|
|
2018-09-21 01:43:32 -04:00
|
|
|
street_signs = {}
|
|
|
|
street_signs.path = minetest.get_modpath(minetest.get_current_modname())
|
2016-03-14 19:03:44 -03:00
|
|
|
screwdriver = screwdriver or {}
|
|
|
|
|
2018-03-24 20:35:42 +01:00
|
|
|
-- Load support for intllib.
|
2018-09-21 01:43:32 -04:00
|
|
|
local S, NS = dofile(street_signs.path .. "/intllib.lua")
|
2018-10-03 04:05:35 -04:00
|
|
|
street_signs.lbm_restore_nodes = {}
|
|
|
|
|
|
|
|
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 } },
|
|
|
|
{ "medium", 6, 50, 1.3, 1.05, 7, 5, { -0.5, -0.5, -0.5, -0.4, 1.5, 1.5 } },
|
|
|
|
{ "large", 6, 80, 1, 1.05, 7, 5, { -0.5, -0.5, -0.5, -0.4, 1.5, 2.5 } }
|
|
|
|
}
|
|
|
|
|
2018-09-29 18:37:04 -04:00
|
|
|
street_signs.big_sign_colors = {
|
2018-09-25 00:56:12 -04:00
|
|
|
{ "green", "f", "dye:green", "dye:white" },
|
|
|
|
{ "blue", "f", "dye:blue", "dye:white" },
|
2018-09-25 22:56:04 -04:00
|
|
|
{ "yellow", "0", "dye:yellow", "dye:black" },
|
|
|
|
{ "orange", "0", "dye:orange", "dye:black" }
|
2018-09-24 20:57:22 -04:00
|
|
|
}
|
|
|
|
|
2018-09-30 20:45:27 -04:00
|
|
|
dofile(street_signs.path.."/signs_misc_generic.lua")
|
|
|
|
dofile(street_signs.path.."/signs_class_d.lua")
|
|
|
|
dofile(street_signs.path.."/signs_class_om.lua")
|
|
|
|
dofile(street_signs.path.."/signs_class_m.lua")
|
|
|
|
dofile(street_signs.path.."/signs_class_r.lua")
|
|
|
|
dofile(street_signs.path.."/signs_class_w.lua")
|
|
|
|
|
2018-09-29 18:37:04 -04:00
|
|
|
dofile(street_signs.path.."/crafting.lua")
|
|
|
|
dofile(street_signs.path.."/compat_convert.lua")
|
2018-09-27 02:12:24 -04:00
|
|
|
|
2018-09-30 20:45:27 -04:00
|
|
|
-- restore signs' text after /clearobjects and the like, the next time
|
|
|
|
-- a block is reloaded by the server.
|
|
|
|
|
|
|
|
minetest.register_lbm({
|
|
|
|
nodenames = street_signs.lbm_restore_nodes,
|
|
|
|
name = "street_signs:restore_sign_text",
|
|
|
|
label = "Restore sign text",
|
|
|
|
run_at_every_load = true,
|
|
|
|
action = function(pos, node)
|
|
|
|
street_signs.update_sign(pos)
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
|
2017-05-12 21:57:11 -07:00
|
|
|
if minetest.settings:get("log_mods") then
|
2018-09-21 01:43:32 -04:00
|
|
|
minetest.log("action", S("[MOD] Street signs loaded"))
|
2016-03-14 19:03:44 -03:00
|
|
|
end
|