use signs_lib's wide-font API features where appropriate
requires signs_lib commit a5e711d3 or later
This commit is contained in:
parent
f9f190d489
commit
87d28feea1
@ -2,6 +2,9 @@
|
||||
local S = signs_lib.gettext
|
||||
local groups = table.copy(signs_lib.standard_steel_groups)
|
||||
|
||||
local sgroups = table.copy(signs_lib.standard_steel_groups)
|
||||
sgroups.not_in_creative_inventory = 1
|
||||
|
||||
local cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
@ -34,7 +37,8 @@ signs_lib.register_sign("street_signs:sign_basic", {
|
||||
mesh = "street_signs_basic_entity.obj",
|
||||
yaw = signs_lib.standard_yaw
|
||||
},
|
||||
allow_onpole = false
|
||||
allow_onpole = false,
|
||||
allow_widefont = true
|
||||
})
|
||||
|
||||
cbox = {
|
||||
@ -69,7 +73,8 @@ signs_lib.register_sign("street_signs:sign_basic_top_only", {
|
||||
mesh = "street_signs_basic_top_only_entity.obj",
|
||||
yaw = signs_lib.standard_yaw
|
||||
},
|
||||
allow_onpole = false
|
||||
allow_onpole = false,
|
||||
allow_widefont = true
|
||||
})
|
||||
|
||||
cbox = signs_lib.make_selection_boxes(24, 24)
|
||||
|
@ -2,6 +2,9 @@
|
||||
local S = signs_lib.gettext
|
||||
local cbox = signs_lib.make_selection_boxes(36, 36)
|
||||
|
||||
local sgroups = table.copy(signs_lib.standard_steel_groups)
|
||||
sgroups.not_in_creative_inventory = 1
|
||||
|
||||
signs_lib.register_sign("street_signs:sign_us_route", {
|
||||
description = "M1-4: Generic \"US Route\" sign",
|
||||
selection_box = cbox,
|
||||
@ -25,6 +28,7 @@ signs_lib.register_sign("street_signs:sign_us_route", {
|
||||
mesh = "street_signs_generic_sign_36x36_entity.obj",
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
allow_widefont = true
|
||||
})
|
||||
|
||||
signs_lib.register_sign("street_signs:sign_us_interstate", {
|
||||
@ -51,6 +55,7 @@ signs_lib.register_sign("street_signs:sign_us_interstate", {
|
||||
mesh = "street_signs_interstate_shield_entity.obj",
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
allow_widefont = true
|
||||
})
|
||||
|
||||
cbox = signs_lib.make_selection_boxes(48, 18)
|
||||
|
@ -73,6 +73,7 @@ signs_lib.register_sign("street_signs:sign_speed_limit", {
|
||||
mesh = "street_signs_generic_sign_30x36_entity.obj",
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
allow_widefont = true
|
||||
})
|
||||
|
||||
cbox = signs_lib.make_selection_boxes(36, 36)
|
||||
@ -505,6 +506,7 @@ signs_lib.register_sign("street_signs:sign_ped_push_button_to_cross_r10_3i", {
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
uses_slim_pole_mount = true,
|
||||
allow_widefont = true
|
||||
})
|
||||
|
||||
signs_lib.register_sign("street_signs:sign_ped_push_button_to_cross_r10_3i_left", {
|
||||
@ -531,9 +533,9 @@ signs_lib.register_sign("street_signs:sign_ped_push_button_to_cross_r10_3i_left"
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
uses_slim_pole_mount = true,
|
||||
allow_widefont = true
|
||||
})
|
||||
|
||||
|
||||
cbox = signs_lib.make_selection_boxes(30, 36)
|
||||
|
||||
signs_lib.register_sign("street_signs:sign_left_on_green_arrow_only", {
|
||||
|
@ -469,6 +469,7 @@ signs_lib.register_sign("street_signs:sign_distance_2_lines", {
|
||||
mesh = "street_signs_generic_sign_24x18_top_entity.obj",
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
allow_widefont = true
|
||||
})
|
||||
|
||||
signs_lib.register_sign("street_signs:sign_distance_2_lines_orange", {
|
||||
@ -494,6 +495,7 @@ signs_lib.register_sign("street_signs:sign_distance_2_lines_orange", {
|
||||
mesh = "street_signs_generic_sign_24x18_top_entity.obj",
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
allow_widefont = true
|
||||
})
|
||||
cbox = signs_lib.make_selection_boxes(30, 30, onpole)
|
||||
|
||||
@ -561,6 +563,7 @@ signs_lib.register_sign("street_signs:sign_low_clearance", {
|
||||
mesh = "street_signs_warning_36x36_entity.obj",
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
allow_widefont = true
|
||||
})
|
||||
cbox = signs_lib.make_selection_boxes(18, 18, onpole, 0, 10, 0)
|
||||
|
||||
@ -587,6 +590,7 @@ signs_lib.register_sign("street_signs:sign_advisory_speed_mph", {
|
||||
mesh = "street_signs_generic_sign_18x18_top_entity.obj",
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
allow_widefont = true
|
||||
})
|
||||
|
||||
signs_lib.register_sign("street_signs:sign_advisory_speed_kmh", {
|
||||
@ -612,6 +616,7 @@ signs_lib.register_sign("street_signs:sign_advisory_speed_kmh", {
|
||||
mesh = "street_signs_generic_sign_18x18_top_entity.obj",
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
allow_widefont = true
|
||||
})
|
||||
|
||||
signs_lib.register_sign("street_signs:sign_advisory_speed_ms", {
|
||||
@ -637,4 +642,5 @@ signs_lib.register_sign("street_signs:sign_advisory_speed_ms", {
|
||||
mesh = "street_signs_generic_sign_18x18_top_entity.obj",
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
allow_widefont = true
|
||||
})
|
||||
|
@ -2,6 +2,9 @@
|
||||
local S = signs_lib.gettext
|
||||
local cbox = signs_lib.make_selection_boxes(36, 36)
|
||||
|
||||
local sgroups = table.copy(signs_lib.standard_steel_groups)
|
||||
sgroups.not_in_creative_inventory = 1
|
||||
|
||||
signs_lib.register_sign("street_signs:sign_warning_3_line", {
|
||||
description = "W3-4: Generic US diamond \"warning\" sign (3-line, yellow)",
|
||||
selection_box = cbox,
|
||||
@ -25,9 +28,11 @@ signs_lib.register_sign("street_signs:sign_warning_3_line", {
|
||||
mesh = "street_signs_warning_36x36_entity.obj",
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_warning_3_line"
|
||||
drop = "street_signs:sign_warning_3_line",
|
||||
allow_widefont = true
|
||||
})
|
||||
|
||||
|
||||
signs_lib.register_sign("street_signs:sign_warning_4_line", {
|
||||
description = "W23-2: Generic US diamond \"warning\" sign (4-line, yellow)",
|
||||
selection_box = cbox,
|
||||
@ -51,7 +56,8 @@ signs_lib.register_sign("street_signs:sign_warning_4_line", {
|
||||
mesh = "street_signs_warning_36x36_entity.obj",
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_warning_4_line"
|
||||
drop = "street_signs:sign_warning_4_line",
|
||||
allow_widefont = true
|
||||
})
|
||||
|
||||
signs_lib.register_sign("street_signs:sign_warning_orange_3_line", {
|
||||
@ -77,7 +83,8 @@ signs_lib.register_sign("street_signs:sign_warning_orange_3_line", {
|
||||
mesh = "street_signs_warning_36x36_entity.obj",
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_warning_orange_3_line"
|
||||
drop = "street_signs:sign_warning_orange_3_line",
|
||||
allow_widefont = true
|
||||
})
|
||||
|
||||
signs_lib.register_sign("street_signs:sign_warning_orange_4_line", {
|
||||
@ -103,8 +110,10 @@ signs_lib.register_sign("street_signs:sign_warning_orange_4_line", {
|
||||
mesh = "street_signs_warning_36x36_entity.obj",
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
drop = "street_signs:sign_warning_orange_4_line"
|
||||
drop = "street_signs:sign_warning_orange_4_line",
|
||||
allow_widefont = true
|
||||
})
|
||||
|
||||
for _, s in ipairs(street_signs.big_sign_sizes) do
|
||||
local size = s[1]
|
||||
local nlines = s[2]
|
||||
@ -148,35 +157,11 @@ for _, s in ipairs(street_signs.big_sign_sizes) do
|
||||
mesh = "street_signs_generic_highway_"..size.."_entity.obj",
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
allow_onpole = false
|
||||
})
|
||||
|
||||
signs_lib.register_sign("street_signs:sign_highway_widefont_"..size.."_"..color, {
|
||||
description = "Generic highway sign (Wide font, "..nlines.."-line, "..size..", "..color..")",
|
||||
inventory_image = "street_signs_generic_highway_"..size.."_"..color.."_inv.png",
|
||||
selection_box = cbox,
|
||||
mesh = "street_signs_generic_highway_"..size..".obj",
|
||||
tiles = {
|
||||
"street_signs_generic_highway_front_"..size.."_"..color..".png",
|
||||
"street_signs_generic_highway_back_"..size..".png",
|
||||
"street_signs_generic_highway_edges.png"
|
||||
},
|
||||
default_color = defc,
|
||||
groups = signs_lib.standard_steel_groups,
|
||||
sounds = signs_lib.standard_steel_sign_sounds,
|
||||
number_of_lines = nlines,
|
||||
chars_per_line = math.ceil(nchars/1.4),
|
||||
horiz_scaling = hscale/1.4,
|
||||
vert_scaling = vscale,
|
||||
line_spacing = 2,
|
||||
font_size = 31,
|
||||
x_offset = xoffs,
|
||||
y_offset = yoffs,
|
||||
entity_info = {
|
||||
mesh = "street_signs_generic_highway_"..size.."_entity.obj",
|
||||
yaw = signs_lib.wallmounted_yaw
|
||||
},
|
||||
allow_onpole = false
|
||||
allow_onpole = false,
|
||||
allow_widefont = true
|
||||
})
|
||||
|
||||
minetest.register_alias("street_signs:sign_highway_widefont_"..size.."_"..color,
|
||||
"street_signs:sign_highway_"..size.."_"..color.."_widefont")
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user