summaryrefslogtreecommitdiff
path: root/labels
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2016-05-22 20:57:24 -0500
committercheapie <no-email-for-you@example.com>2016-05-22 20:57:24 -0500
commitf21e1d3824bc718a50af729605d0ec616d393d6a (patch)
tree25877ddd4f5267cfb7c785337d7621e48a75f48a /labels
parent6a4b03d714f642043e5244462200dac2c5b64f7d (diff)
downloadroads-f21e1d3824bc718a50af729605d0ec616d393d6a.tar
roads-f21e1d3824bc718a50af729605d0ec616d393d6a.tar.gz
roads-f21e1d3824bc718a50af729605d0ec616d393d6a.tar.bz2
roads-f21e1d3824bc718a50af729605d0ec616d393d6a.tar.xz
roads-f21e1d3824bc718a50af729605d0ec616d393d6a.zip
Add printer and convert marks to use it instead of crafting
Diffstat (limited to 'labels')
-rw-r--r--labels/init.lua420
-rw-r--r--labels/textures/streets_printer_b.pngbin0 -> 170 bytes
-rw-r--r--labels/textures/streets_printer_bt.pngbin0 -> 154 bytes
-rw-r--r--labels/textures/streets_printer_f.pngbin0 -> 166 bytes
-rw-r--r--labels/textures/streets_printer_inv.pngbin0 -> 2435 bytes
-rw-r--r--labels/textures/streets_printer_l.pngbin0 -> 183 bytes
-rw-r--r--labels/textures/streets_printer_r.pngbin0 -> 182 bytes
-rw-r--r--labels/textures/streets_printer_t.pngbin0 -> 322 bytes
-rw-r--r--labels/textures/streets_white_cartridge.pngbin0 -> 324 bytes
-rw-r--r--labels/textures/streets_yellow_cartridge.pngbin0 -> 330 bytes
10 files changed, 261 insertions, 159 deletions
diff --git a/labels/init.lua b/labels/init.lua
index 6f1b6c0..6caafc0 100644
--- a/labels/init.lua
+++ b/labels/init.lua
@@ -2,7 +2,231 @@
StreetsMod: All kinds of asphalt with labels
]]
-streets.register_label = function(friendlyname,name,tex,craft)
+labels = {}
+
+labels.printer = {}
+
+labels.printer.marktypes = {}
+
+function labels.printer.can_dig(pos)
+ local meta = minetest.get_meta(pos)
+ local inv = meta:get_inventory()
+ return (inv:is_empty("whitecart") and inv:is_empty("yellowcart") and inv:is_empty("paper"))
+end
+
+function labels.printer.checksupplies(pos)
+ local meta = minetest.get_meta(pos)
+ local inv = meta:get_inventory()
+ local whitecart = inv:get_stack("whitecart",1)
+ local yellowcart = inv:get_stack("yellowcart",1)
+ local paper = inv:get_stack("paper",1)
+ if not whitecart:to_table() or not yellowcart:to_table() or not paper:to_table() then
+ return false
+ end
+ local whitecart_good = whitecart:to_table().name == "streets:whitecartridge" and whitecart:to_table().wear < 60000
+ local yellowcart_good = yellowcart:to_table().name == "streets:yellowcartridge" and yellowcart:to_table().wear < 60000
+ local paper_good = paper:to_table().name == "default:paper"
+ local good = yellowcart_good and whitecart_good and paper_good
+ return good
+end
+
+function labels.printer.nom(pos,color,amount)
+ local meta = minetest.get_meta(pos)
+ local inv = meta:get_inventory()
+ local whitecart = inv:get_stack("whitecart",1)
+ local yellowcart = inv:get_stack("yellowcart",1)
+ local paper = inv:get_stack("paper",1)
+ if color == "white" then
+ whitecart:add_wear(amount*1000)
+ elseif color == "yellow" then
+ yellowcart:add_wear(amount*1000)
+ end
+ paper:take_item(1)
+ inv:set_stack("yellowcart",1,yellowcart)
+ inv:set_stack("whitecart",1,whitecart)
+ inv:set_stack("paper",1,paper)
+end
+
+function labels.printer.populateoutput(pos)
+ local typescount = #labels.printer.marktypes
+ local pagesize = 8*5
+ local meta = minetest.get_meta(pos)
+ local inv = meta:get_inventory()
+ local page = meta:get_int("page")
+ local maxpage = math.ceil(typescount/pagesize)
+ inv:set_list("output",{})
+ inv:set_size("output", typescount)
+ if labels.printer.checksupplies(pos) then
+ for k,v in ipairs(labels.printer.marktypes) do
+ inv:set_stack("output",k,v.name)
+ end
+ end
+ meta:set_string("formspec", "size[11,10]"..
+ "label[0,0;Yellow\nCartridge]" ..
+ "list[current_name;yellowcart;1.5,0;1,1;]" ..
+ "label[0,1;White\nCartridge]" ..
+ "list[current_name;whitecart;1.5,1;1,1;]" ..
+ "label[0,2;Paper]" ..
+ "list[current_name;paper;1.5,2;1,1;]" ..
+ "list[current_name;output;2.8,0;8,5;"..tostring((page-1)*pagesize).."]" ..
+ "list[current_player;main;1.5,6.25;8,4;]"..
+ "button[4,5;1,1;prevpage;<<<]"..
+ "button[7,5;1,1;nextpage;>>>]"..
+ "label[5.25,5.25;Page "..page.." of "..maxpage.."]")
+ meta:set_int("maxpage",maxpage)
+end
+
+function labels.printer.on_construct(pos)
+ local meta = minetest.get_meta(pos)
+ local inv = meta:get_inventory()
+ meta:set_int("page",1)
+ meta:set_int("maxpage",1)
+ inv:set_size("yellowcart", 1)
+ inv:set_size("whitecart", 1)
+ inv:set_size("paper", 1)
+ labels.printer.populateoutput(pos)
+end
+
+function labels.printer.on_receive_fields(pos, formname, fields, sender)
+ local meta = minetest.get_meta(pos)
+ local page = meta:get_int("page")
+ local maxpage = meta:get_int("maxpage")
+ if fields.prevpage then
+ page = page - 1
+ if page < 1 then
+ page = maxpage
+ end
+ meta:set_int("page",page)
+ elseif fields.nextpage then
+ page = page + 1
+ if page > maxpage then
+ page = 1
+ end
+ meta:set_int("page",page)
+ end
+ labels.printer.populateoutput(pos)
+end
+
+function labels.printer.allow_metadata_inventory_put(pos, listname, index, stack, player)
+ if listname == "yellowcart" then
+ if stack:get_name() == "streets:yellowcartridge" then
+ return 1
+ else
+ return 0
+ end
+ elseif listname == "whitecart" then
+ if stack:get_name() == "streets:whitecartridge" then
+ return 1
+ else
+ return 0
+ end
+ elseif listname == "paper" then
+ if stack:get_name() == "default:paper" then
+ return stack:get_count()
+ else
+ return 0
+ end
+ else
+ return 0
+ end
+end
+
+function labels.printer.on_metadata_inventory_put(pos)
+ labels.printer.populateoutput(pos)
+end
+
+function labels.printer.on_metadata_inventory_take(pos, listname, index)
+ if listname == "output" then
+ local cost = labels.printer.marktypes[index].inkamt
+ local color = labels.printer.marktypes[index].color
+ labels.printer.nom(pos,color,cost)
+ end
+ labels.printer.populateoutput(pos)
+end
+
+function labels.printer.allow_metadata_inventory_move(pos, from_list, from_index, to_list, to_index, count, player)
+ return 0
+end
+
+minetest.register_tool(":streets:yellowcartridge",{
+ description = "Yellow Ink Cartridge",
+ inventory_image = "streets_yellow_cartridge.png"
+ }
+)
+
+minetest.register_tool(":streets:whitecartridge",{
+ description = "White Ink Cartridge",
+ inventory_image = "streets_white_cartridge.png"
+ }
+)
+
+minetest.register_craft({
+ output = "streets:yellowcartridge",
+ recipe = {{"homedecor:plastic_sheeting","homedecor:plastic_sheeting","homedecor:plastic_sheeting"},
+ {"homedecor:plastic_sheeting","dye:yellow","homedecor:plastic_sheeting"},
+ {"homedecor:plastic_sheeting","",""}}
+})
+
+minetest.register_craft({
+ output = "streets:whitecartridge",
+ recipe = {{"homedecor:plastic_sheeting","homedecor:plastic_sheeting","homedecor:plastic_sheeting"},
+ {"homedecor:plastic_sheeting","dye:white","homedecor:plastic_sheeting"},
+ {"homedecor:plastic_sheeting","",""}}
+})
+
+minetest.register_craft({
+ output = "streets:yellowcartridge",
+ type = "shapeless",
+ recipe = {"streets:yellowcartridge","dye:yellow"}
+})
+
+minetest.register_craft({
+ output = "streets:whitecartridge",
+ type = "shapeless",
+ recipe = {"streets:whitecartridge","dye:white"}
+})
+
+minetest.register_craft({
+ output = "streets:printer",
+ recipe = {{"","homedecor:plastic_sheeting","homedecor:power_crystal"},
+ {"homedecor:motor","default:steel_ingot","group:wool"},
+ {"","homedecor:plastic_sheeting","homedecor:motor"}}
+})
+
+minetest.register_node(":streets:printer", {
+ description = "Road Markings Printer",
+ inventory_image = "streets_printer_inv.png",
+ tiles = {"streets_printer_t.png","streets_printer_bt.png","streets_printer_l.png",
+ "streets_printer_r.png","streets_printer_b.png","streets_printer_f.png"},
+ paramtype = "light",
+ paramtype2 = "facedir",
+ walkable = true,
+ groups = {snappy=3},
+ sound = default.node_sound_wood_defaults(),
+ drawtype = "nodebox",
+ on_construct = labels.printer.on_construct,
+ allow_metadata_inventory_put = labels.printer.allow_metadata_inventory_put,
+ on_metadata_inventory_put = labels.printer.on_metadata_inventory_put,
+ on_metadata_inventory_take = labels.printer.on_metadata_inventory_take,
+ allow_metadata_inventory_move = labels.printer.allow_metadata_inventory_move,
+ on_receive_fields = labels.printer.on_receive_fields,
+ can_dig = labels.printer.can_dig,
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.4375, -0.3125, -0.125, 0.4375, -0.0625, 0.375},
+ {-0.4375, -0.5, -0.125, 0.4375, -0.4375, 0.375},
+ {-0.4375, -0.5, -0.125, -0.25, -0.0625, 0.375},
+ {0.25, -0.5, -0.125, 0.4375, -0.0625, 0.375},
+ {-0.4375, -0.5, -0.0625, 0.4375, -0.0625, 0.375},
+ {-0.375, -0.4375, 0.25, 0.375, -0.0625, 0.4375},
+ {-0.25, -0.25, 0.4375, 0.25, 0.0625, 0.5},
+ {-0.25, -0.481132, -0.3125, 0.25, -0.4375, 0}
+ },
+ },
+})
+
+streets.register_label = function(friendlyname,name,tex,color,ink_needed)
minetest.register_node(":streets:mark_"..name,{
description = streets.S("Marking Overlay: "..friendlyname),
tiles = {tex,"streets_rw_transparent.png"},
@@ -48,10 +272,6 @@ streets.register_label = function(friendlyname,name,tex,craft)
recipe = {"streets:asphalt","streets:mark_"..name}
})
- minetest.register_craft({
- output = "streets:mark_"..name.." 6",
- recipe = craft
- })
if minetest.get_modpath("moreblocks") then
stairsplus:register_all("streets", name, "streets:mark_"..name.."_on_asphalt", {
description = "Asphalt with Marking: "..friendlyname,
@@ -59,291 +279,173 @@ streets.register_label = function(friendlyname,name,tex,craft)
groups = {cracky=3}
})
end
+ local printdata = {name="streets:mark_"..name,color=color,inkamt=ink_needed}
+ table.insert(labels.printer.marktypes,printdata)
end
--White Markings
-streets.register_label("All-White","all_white","streets_all_white.png",{
- {"dye:white","dye:white","dye:white"},
- {"dye:white","dye:white","dye:white"},
- {"dye:white","dye:white","dye:white"}
- })
+streets.register_label("All-White","all_white","streets_all_white.png","white",9)
-streets.register_label("Solid White Side Line","solid_white_side_line","streets_asphalt_side.png",{
- {"","",""},
- {"","",""},
- {"dye:white","dye:white","dye:white"}
- })
+streets.register_label("Solid White Side Line","solid_white_side_line","streets_asphalt_side.png","white",3)
minetest.register_alias("streets:asphalt_side","streets:mark_solid_white_side_line_on_asphalt")
minetest.register_alias("streets:asphalt_sideline","streets:mark_solid_white_side_line_on_asphalt")
-streets.register_label("Solid White Side Line (rotated)","solid_white_side_line_rotated","streets_asphalt_side.png^[transformR180",{{"streets:mark_solid_white_side_line"}})
+streets.register_label("Solid White Side Line (rotated)","solid_white_side_line_rotated","streets_asphalt_side.png^[transformR180","white",3)
minetest.register_alias("streets:asphalt_sideline_r","streets:mark_solid_white_side_line_rotated_on_asphalt")
-streets.register_label("Solid White Center Line","solid_white_center_line","streets_asphalt_solid_line.png",{
- {"","dye:white",""},
- {"","dye:white",""},
- {"","dye:white",""}
- })
+streets.register_label("Solid White Center Line","solid_white_center_line","streets_asphalt_solid_line.png","white",2)
minetest.register_alias("streets:asphalt_middle","streets:mark_solid_white_center_line_on_asphalt")
minetest.register_alias("streets:asphalt_solid_line","streets:mark_solid_white_center_line_on_asphalt")
-streets.register_label("Dashed White Center Line","dashed_white_center_line","streets_asphalt_dashed_line.png",{
- {"","dye:white",""},
- {"","",""},
- {"","dye:white",""}
- })
+streets.register_label("Dashed White Center Line","dashed_white_center_line","streets_asphalt_dashed_line.png","white",1)
minetest.register_alias("streets:asphalt_middle_dashed","streets:mark_dashed_white_center_line_on_asphalt")
minetest.register_alias("streets:asphalt_dashed_line","streets:mark_dashed_white_center_line_on_asphalt")
-streets.register_label("Solid White Side Line (corner)","solid_white_side_line_corner","streets_asphalt_outer_edge.png",{
- {"dye:white","dye:white","dye:white"},
- {"dye:white","",""},
- {"dye:white","",""}
- })
+streets.register_label("Solid White Side Line (corner)","solid_white_side_line_corner","streets_asphalt_outer_edge.png","white",4)
minetest.register_alias("streets:asphalt_outer_edge","streets:mark_solid_white_side_line_corner_on_asphalt")
-streets.register_label("Solid White Side Line (corner, rotated)","solid_white_side_line_corner_rotated","streets_asphalt_outer_edge.png^[transformR270",{{"streets:mark_solid_white_line_corner"}})
+streets.register_label("Solid White Side Line (corner, rotated)","solid_white_side_line_corner_rotated","streets_asphalt_outer_edge.png^[transformR270","white",4)
minetest.register_alias("streets:asphalt_outer_edge_r","streets:mark_solid_white_side_line_corner_rotated_on_asphalt")
-streets.register_label("Parking (white)","white_parking","streets_parking.png",{
- {"","dye:white","dye:white"},
- {"","dye:white","dye:white"},
- {"","dye:white",""}
- })
+streets.register_label("Parking (white)","white_parking","streets_parking.png","white",4)
minetest.register_alias("streets:asphalt_parking","streets:mark_white_parking_on_asphalt")
-streets.register_label("White Arrow (straight)","white_arrow_straight","streets_arrow_straight.png",{
- {"","",""},
- {"","dye:white",""},
- {"","dye:white",""}
- })
+streets.register_label("White Arrow (straight)","white_arrow_straight","streets_arrow_straight.png","white",3)
minetest.register_alias("streets:asphalt_arrow_straight","streets:mark_white_arrow_straight_on_asphalt")
-streets.register_label("White Arrow (left)","white_arrow_left","streets_arrow_left.png",{
- {"","",""},
- {"dye:white","dye:white",""},
- {"","dye:white",""}
- })
+streets.register_label("White Arrow (left)","white_arrow_left","streets_arrow_left.png","white",3)
minetest.register_alias("streets:asphalt_arrow_left","streets:mark_white_arrow_left_on_asphalt")
-streets.register_label("White Arrow (right)","white_arrow_right","streets_arrow_right.png",{
- {"","",""},
- {"","dye:white","dye:white"},
- {"","dye:white",""}
- })
+streets.register_label("White Arrow (right)","white_arrow_right","streets_arrow_right.png","white",3)
minetest.register_alias("streets:asphalt_arrow_right","streets:mark_white_arrow_right_on_asphalt")
-streets.register_label("White Arrow (left+straight)","white_arrow_left_straight","streets_arrow_straight_left.png",{
- {"","dye:white",""},
- {"dye:white","dye:white",""},
- {"","dye:white",""}
- })
+streets.register_label("White Arrow (left+straight)","white_arrow_left_straight","streets_arrow_straight_left.png","white",4)
minetest.register_alias("streets:asphalt_arrow_straight_left","streets:mark_white_arrow_left_straight_on_asphalt")
-streets.register_label("White Arrow (straight+right)","white_arrow_straight_right","streets_arrow_straight_right.png",{
- {"","dye:white",""},
- {"","dye:white","dye:white"},
- {"","dye:white",""}
- })
+streets.register_label("White Arrow (straight+right)","white_arrow_straight_right","streets_arrow_straight_right.png","white",4)
minetest.register_alias("streets:asphalt_arrow_straight_right","streets:mark_white_arrow_straight_right_on_asphalt")
-streets.register_label("White Arrow (left+straight+right)","white_arrow_left_straight_right","streets_arrow_alldirs.png",{
- {"","dye:white",""},
- {"dye:white","dye:white","dye:white"},
- {"","dye:white",""}
- })
+streets.register_label("White Arrow (left+straight+right)","white_arrow_left_straight_right","streets_arrow_alldirs.png","white",5)
minetest.register_alias("streets:asphalt_arrow_alldirs","streets:mark_white_arrow_left_straight_right_on_asphalt")
--Yellow streetsmod markings
-streets.register_label("Solid Yellow Center Line","solid_yellow_center_line","streets_rw_solid_line.png",{
- {"","dye:yellow",""},
- {"","dye:yellow",""},
- {"","dye:yellow",""}
- })
+streets.register_label("Solid Yellow Center Line","solid_yellow_center_line","streets_rw_solid_line.png","yellow",3)
minetest.register_alias("streets:rw_asphalt_solid","streets:mark_solid_yellow_center_line")
-streets.register_label("Dashed Yellow Center Line","dashed_yellow_center_line","streets_rw_dashed_line.png",{
- {"","dye:yellow",""},
- {"","",""},
- {"","dye:yellow",""}
- })
+streets.register_label("Dashed Yellow Center Line","dashed_yellow_center_line","streets_rw_dashed_line.png","yellow",2)
minetest.register_alias("streets:rw_asphalt_dashed","streets:mark_dashed_yellow_center_line")
-streets.register_label("Yellow X","yellow_x","streets_rw_cross.png",{
- {"dye:yellow","","dye:yellow"},
- {"","dye:yellow",""},
- {"dye:yellow","","dye:yellow"}
- })
+streets.register_label("Yellow X","yellow_x","streets_rw_cross.png","yellow",3)
minetest.register_alias("streets:rw_cross","streets:mark_yellow_x")
-streets.register_label("Solid Yellow Side Line (corner)","solid_yellow_side_line_corner","streets_rw_outer_edge.png",{
- {"dye:yellow","dye:yellow","dye:yellow"},
- {"dye:yellow","",""},
- {"dye:yellow","",""}
- })
+streets.register_label("Solid Yellow Side Line (corner)","solid_yellow_side_line_corner","streets_rw_outer_edge.png","yellow",4)
minetest.register_alias("streets:rw_outer_edge","streets:solid_yellow_side_line_corner")
-streets.register_label("Solid Yellow Side Line (corner,rotated)","solid_yellow_side_line_corner_rotated","streets_rw_outer_edge.png^[transformR270",{{"streets:mark_solid_yellow_side_line_corner"}})
+streets.register_label("Solid Yellow Side Line (corner,rotated)","solid_yellow_side_line_corner_rotated","streets_rw_outer_edge.png^[transformR270","yellow",5)
minetest.register_alias("streets:rw_outer_edge","streets:solid_yellow_side_line_corner")
-streets.register_label("Parking (yellow)","yellow_parking","streets_rw_parking.png",{
- {"","dye:yellow","dye:yellow"},
- {"","dye:yellow","dye:yellow"},
- {"","dye:yellow",""}
- })
+streets.register_label("Parking (yellow)","yellow_parking","streets_rw_parking.png","yellow",4)
minetest.register_alias("streets:rw_parking","streets:mark_yellow_parking")
-streets.register_label("Yellow Arrow (straight)","yellow_arrow_straight","streets_rw_arrow_straight.png",{
- {"","",""},
- {"","dye:yellow",""},
- {"","dye:yellow",""}
- })
+streets.register_label("Yellow Arrow (straight)","yellow_arrow_straight","streets_rw_arrow_straight.png","yellow",3)
minetest.register_alias("streets:rw_straight","streets:mark_yellow_arrow_straight")
-streets.register_label("Yellow Arrow (left)","yellow_arrow_left","streets_rw_arrow_left.png",{
- {"","",""},
- {"dye:yellow","dye:yellow",""},
- {"","dye:yellow",""}
- })
+streets.register_label("Yellow Arrow (left)","yellow_arrow_left","streets_rw_arrow_left.png","yellow",3)
minetest.register_alias("streets:rw_left","streets:mark_yellow_arrow_left")
-streets.register_label("Yellow Arrow (right)","yellow_arrow_right","streets_rw_arrow_right.png",{
- {"","",""},
- {"","dye:yellow","dye:yellow"},
- {"","dye:yellow",""}
- })
+streets.register_label("Yellow Arrow (right)","yellow_arrow_right","streets_rw_arrow_right.png","yellow",3)
minetest.register_alias("streets:rw_right","streets:mark_yellow_arrow_right")
-streets.register_label("Yellow Arrow (left+straight)","yellow_arrow_left_straight","streets_rw_arrow_straight_left.png",{
- {"","dye:yellow",""},
- {"dye:yellow","dye:yellow",""},
- {"","dye:yellow",""}
- })
+streets.register_label("Yellow Arrow (left+straight)","yellow_arrow_left_straight","streets_rw_arrow_straight_left.png","yellow",4)
minetest.register_alias("streets:rw_straight_left","streets:mark_yellow_arrow_left_straight")
-streets.register_label("Yellow Arrow (straight+right)","yellow_arrow_straight_right","streets_rw_arrow_straight_right.png",{
- {"","dye:yellow",""},
- {"","dye:yellow","dye:yellow"},
- {"","dye:yellow",""}
- })
+streets.register_label("Yellow Arrow (straight+right)","yellow_arrow_straight_right","streets_rw_arrow_straight_right.png","yellow",4)
minetest.register_alias("streets:rw_straight_right","streets:mark_yellow_arrow_straight_right")
-streets.register_label("Yellow Arrow (left+straight+right)","yellow_arrow_left_straight_right","streets_rw_arrow_alldirs.png",{
- {"","dye:yellow",""},
- {"dye:yellow","dye:yellow","dye:yellow"},
- {"","dye:yellow",""}
- })
+streets.register_label("Yellow Arrow (left+straight+right)","yellow_arrow_left_straight_right","streets_rw_arrow_alldirs.png","yellow",5)
minetest.register_alias("streets:rw_alldirs","streets:mark_yellow_arrow_left_straight_right")
-streets.register_label("Solid Yellow Side Line","solid_yellow_side_line","streets_rw_asphalt_side.png",{
- {"dye:yellow","",""},
- {"dye:yellow","",""},
- {"dye:yellow","",""}
- })
+streets.register_label("Solid Yellow Side Line","solid_yellow_side_line","streets_rw_asphalt_side.png","yellow",3)
minetest.register_alias("streets:rw_sideline","streets:mark_solid_yellow_side_line")
-streets.register_label("Solid Yellow Side Line (rotated)","solid_yellow_side_line_rotated","streets_rw_asphalt_side.png^[transformR180",{{"streets:mark_solid_yellow_side_line"}})
+streets.register_label("Solid Yellow Side Line (rotated)","solid_yellow_side_line_rotated","streets_rw_asphalt_side.png^[transformR180","yellow",3)
-streets.register_label("Yellow Diagonal Lines","yellow_diagonal","streets_yellow_diagonal_lines.png",{
- {"dye:yellow","",""},
- {"","dye:yellow",""},
- {"","","dye:yellow"}
- })
+streets.register_label("Yellow Diagonal Lines","yellow_diagonal","streets_yellow_diagonal_lines.png","yellow",5)
--Infrastructure markings
-streets.register_label("Solid Yellow Center Line (wide)","solid_yellow_center_line_wide","infrastructure_single_yellow_line.png",{
- {"","",""},
- {"dye:yellow","dye:yellow","dye:yellow"},
- {"","",""}
- })
+streets.register_label("Solid Yellow Center Line (wide)","solid_yellow_center_line_wide","infrastructure_single_yellow_line.png","yellow",4)
minetest.register_alias("infrastructure:asphalt_center_solid_line","streets:mark_solid_yellow_center_line_wide_on_asphalt")
-streets.register_label("Solid Yellow Center Line (wide,offset)","solid_yellow_center_line_wide_offset","infrastructure_solid_yellow_line_one_side.png",{
- {"","",""},
- {"","",""},
- {"dye:yellow","dye:yellow","dye:yellow"}
- })
+streets.register_label("Solid Yellow Center Line (wide,offset)","solid_yellow_center_line_wide_offset","infrastructure_solid_yellow_line_one_side.png","yellow",4)
minetest.register_alias("infrastructure:asphalt_center_solid_one_side","streets:mark_solid_yellow_center_line_wide_offset_on_asphalt")
-streets.register_label("Double Yellow Center Line (wide)","double_yellow_center_line_wide","infrastructure_double_yellow_line.png",{
- {"dye:yellow","dye:yellow","dye:yellow"},
- {"","",""},
- {"dye:yellow","dye:yellow","dye:yellow"}
- })
+streets.register_label("Double Yellow Center Line (wide)","double_yellow_center_line_wide","infrastructure_double_yellow_line.png","yellow",6)
minetest.register_alias("infrastructure:asphalt_center_solid_double","streets:mark_double_yellow_center_line_wide_on_asphalt")
-streets.register_label("Solid Yellow Center Line (wide,corner)","solid_yellow_center_line_wide_corner","infrastructure_single_yellow_line_corner.png",{
- {"","dye:yellow","dye:yellow"},
- {"","dye:yellow",""},
- {"","dye:yellow",""}
- })
+streets.register_label("Solid Yellow Center Line (wide,corner)","solid_yellow_center_line_wide_corner","infrastructure_single_yellow_line_corner.png","yellow",4)
minetest.register_alias("infrastructure:asphalt_center_corner_single","streets:mark_solid_yellow_center_line_wide_corner_on_asphalt")
-streets.register_label("Double Yellow Center Line (wide,corner)","double_yellow_center_line_wide_corner","infrastructure_solid_double_yellow_line_corner.png",{
- {"dye:yellow","dye:yellow","dye:yellow"},
- {"dye:yellow","",""},
- {"dye:yellow","","dye:yellow"}
- })
+streets.register_label("Double Yellow Center Line (wide,corner)","double_yellow_center_line_wide_corner","infrastructure_solid_double_yellow_line_corner.png","yellow",6)
minetest.register_alias("infrastructure:asphalt_center_corner_double","streets:mark_double_yellow_center_line_wide_corner_on_asphalt")
diff --git a/labels/textures/streets_printer_b.png b/labels/textures/streets_printer_b.png
new file mode 100644
index 0000000..a3bc6b1
--- /dev/null
+++ b/labels/textures/streets_printer_b.png
Binary files differ
diff --git a/labels/textures/streets_printer_bt.png b/labels/textures/streets_printer_bt.png
new file mode 100644
index 0000000..6e03ece
--- /dev/null
+++ b/labels/textures/streets_printer_bt.png
Binary files differ
diff --git a/labels/textures/streets_printer_f.png b/labels/textures/streets_printer_f.png
new file mode 100644
index 0000000..f8abf3e
--- /dev/null
+++ b/labels/textures/streets_printer_f.png
Binary files differ
diff --git a/labels/textures/streets_printer_inv.png b/labels/textures/streets_printer_inv.png
new file mode 100644
index 0000000..064d996
--- /dev/null
+++ b/labels/textures/streets_printer_inv.png
Binary files differ
diff --git a/labels/textures/streets_printer_l.png b/labels/textures/streets_printer_l.png
new file mode 100644
index 0000000..94be11e
--- /dev/null
+++ b/labels/textures/streets_printer_l.png
Binary files differ
diff --git a/labels/textures/streets_printer_r.png b/labels/textures/streets_printer_r.png
new file mode 100644
index 0000000..bd25496
--- /dev/null
+++ b/labels/textures/streets_printer_r.png
Binary files differ
diff --git a/labels/textures/streets_printer_t.png b/labels/textures/streets_printer_t.png
new file mode 100644
index 0000000..3caa452
--- /dev/null
+++ b/labels/textures/streets_printer_t.png
Binary files differ
diff --git a/labels/textures/streets_white_cartridge.png b/labels/textures/streets_white_cartridge.png
new file mode 100644
index 0000000..2a08af8
--- /dev/null
+++ b/labels/textures/streets_white_cartridge.png
Binary files differ
diff --git a/labels/textures/streets_yellow_cartridge.png b/labels/textures/streets_yellow_cartridge.png
new file mode 100644
index 0000000..1759ee2
--- /dev/null
+++ b/labels/textures/streets_yellow_cartridge.png
Binary files differ