aboutsummaryrefslogtreecommitdiff
path: root/signs
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-12-03 23:17:35 +0100
committerorwell96 <orwell@bleipb.de>2018-12-03 23:17:35 +0100
commit8928f78ee6305e29ed8d3b9395fcb6564c984fdf (patch)
treecd250c2b98d7131158e3744efe238780cec73fec /signs
parenteccdad46ef2b38cd061aab7ae6bcb252a67c2218 (diff)
parenta3e0d36a68247cac40349d9089fe3c71546d75e8 (diff)
downloaddisplay_modpack-master.tar.gz
display_modpack-master.tar.bz2
display_modpack-master.zip
Merge remote-tracking branch 'upstream/master'HEADmaster
Resolved conflicts by reordering of files
Diffstat (limited to 'signs')
-rw-r--r--signs/README.md2
-rw-r--r--signs/common.lua161
-rw-r--r--signs/compatibility.lua35
-rw-r--r--signs/copyright.txt10
-rw-r--r--signs/crafts.lua47
-rw-r--r--signs/depends.txt6
-rw-r--r--signs/nodes.lua217
-rw-r--r--signs/svg/poster.svg174
-rw-r--r--signs/textures/signs_label.pngbin0 -> 404 bytes
-rw-r--r--signs/textures/signs_label_medium_inventory.pngbin0 -> 406 bytes
-rw-r--r--signs/textures/signs_label_small_inventory.pngbin0 -> 417 bytes
-rw-r--r--signs/textures/signs_wooden.pngbin0 -> 574 bytes
-rw-r--r--signs/textures/signs_wooden_direction_inventory.pngbin0 -> 710 bytes
-rw-r--r--signs/textures/signs_wooden_inventory.pngbin606 -> 581 bytes
-rw-r--r--signs/textures/signs_wooden_long.pngbin0 -> 524 bytes
-rw-r--r--signs/textures/signs_wooden_long_inventory.pngbin0 -> 636 bytes
16 files changed, 337 insertions, 315 deletions
diff --git a/signs/README.md b/signs/README.md
index 9e678de..0282d2e 100644
--- a/signs/README.md
+++ b/signs/README.md
@@ -2,7 +2,7 @@
This mod provides various signs with text display. Text is locked if area is protected.
-For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?f=11&t=13563) at the Minetest forums.
+For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums.
**Dependancies**: default, display\_lib, font\_lib
diff --git a/signs/common.lua b/signs/common.lua
index 49c6dd4..733a44c 100644
--- a/signs/common.lua
+++ b/signs/common.lua
@@ -21,111 +21,6 @@
local S = signs.intllib
local F = function(...) return minetest.formspec_escape(S(...)) end
-function signs.set_display_text(pos,text)
- local meta = minetest.get_meta(pos)
- meta:set_string("display_text", text)
- meta:set_string("infotext", "\""..text.."\"")
- display_lib.update_entities(pos)
-end
-
-function signs.set_formspec(pos)
- local meta = minetest.get_meta(pos)
- local ndef = minetest.registered_nodes[minetest.get_node(pos).name]
- if ndef and ndef.display_entities and ndef.display_entities["signs:display_text"] then
- local maxlines = ndef.display_entities["signs:display_text"].maxlines
- local formspec
-
- if maxlines == 1 then
- formspec = "size[6,3]"..
- "field[0.5,0.7;5.5,1;display_text;"..F("Text")..";${display_text}]"..
- "button_exit[2,2;2,1;ok;"..F("Write").."]"
- else
- local extralabel = ""
- if maxlines then
- extralabel = F(" (first %s lines only)"):format(maxlines)
- end
-
- formspec = "size[6,4]"..
- "textarea[0.5,0.7;5.5,2;display_text;"..F("Text")..""..extralabel..";${display_text}]"..
- "button_exit[2,3;2,1;ok;"..F("Write").."]"
- end
-
- meta:set_string("formspec", formspec)
- end
-end
-
-function signs.on_receive_fields(pos, formname, fields, player)
- if not minetest.is_protected(pos, player:get_player_name()) then
- if fields and (fields.ok or fields.key_enter) then
- signs.set_display_text(pos, fields.display_text)
- end
- end
-end
-
--- On place callback for direction signs
--- (chooses which sign according to look direction)
-function signs.on_place_direction(itemstack, placer, pointed_thing)
- local name = itemstack:get_name()
- local ndef = minetest.registered_nodes[name]
-
- local bdir = {x = pointed_thing.under.x - pointed_thing.above.x,
- y = pointed_thing.under.y - pointed_thing.above.y,
- z = pointed_thing.under.z - pointed_thing.above.z}
- local pdir = placer:get_look_dir()
-
- local ndir, test
-
- if ndef.paramtype2 == "facedir" then
- if bdir.x == 0 and bdir.z == 0 then
- -- Ceiling or floor pointed (facedir chosen from player dir)
- ndir = minetest.dir_to_facedir({x=pdir.x, y=0, z=pdir.z})
- else
- -- Wall pointed
- ndir = minetest.dir_to_facedir(bdir)
- end
-
- test = {[0]=-pdir.x, pdir.z, pdir.x, -pdir.z}
- end
-
- if ndef.paramtype2 == "wallmounted" then
- ndir = minetest.dir_to_wallmounted(bdir)
- if ndir == 0 or ndir == 1 then
- -- Ceiling or floor
- ndir = minetest.dir_to_wallmounted({x=pdir.x, y=0, z=pdir.z})
- end
-
- test = {0, pdir.z, -pdir.z, -pdir.x, pdir.x}
- end
-
- -- Only for direction signs
- if ndef.signs_other_dir then
- if test[ndir] > 0 then
- itemstack:set_name(ndef.signs_other_dir)
- end
- itemstack = minetest.item_place(itemstack, placer, pointed_thing, ndir)
- itemstack:set_name(name)
-
- return itemstack
- else
- return minetest.item_place(itemstack, placer, pointed_thing, ndir)
- end
-end
-
--- Handles screwdriver rotation. Direction is affected for direction signs
-function signs.on_rotate(pos, node, player, mode, new_param2)
- if mode == 2 then
- local ndef = minetest.registered_nodes[node.name]
- if ndef.signs_other_dir then
- minetest.swap_node(pos, {name = ndef.signs_other_dir,
- param1 = node.param1, param2 = node.param2})
- display_lib.update_entities(pos)
- end
- else
- display_lib.on_rotate(pos, node, user, mode, new_param2)
- end
- return false;
-end
-
-- Generic callback for show_formspec displayed formspecs of "sign" mod
minetest.register_on_player_receive_fields(function(player, formname, fields)
@@ -140,59 +35,3 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
end
end
end)
-
-function signs.register_sign(mod, name, model)
- -- Default fields
- local fields = {
- sunlight_propagates = true,
- paramtype = "light",
- paramtype2 = "facedir",
- drawtype = "nodebox",
- node_box = {
- type = "fixed",
- fixed = {-model.width/2, -model.height/2, 0.5,
- model.width/2, model.height/2, 0.5 - model.depth},
- },
- groups = {choppy=2, dig_immediate=2, not_blocking_trains = 1},
- sounds = default.node_sound_defaults(),
- display_entities = {
- ["signs:display_text"] = {
- on_display_update = font_lib.on_display_update,
- depth = 0.499 - model.depth,
- size = { x = model.width, y = model.height },
- resolution = { x = 64, y = 64 },
- maxlines = 1,
- },
-
- },
- on_place = display_lib.on_place,
- on_construct = function(pos)
- signs.set_formspec(pos)
- display_lib.on_construct(pos)
- end,
- on_destruct = display_lib.on_destruct,
- on_rotate = signs.on_rotate,
- on_receive_fields = signs.on_receive_fields,
- on_punch = function(pos, node, player, pointed_thing) display_lib.update_entities(pos) end,
- }
-
- -- Node fields override
- for key, value in pairs(model.node_fields) do
- if key == "groups" then
- for key2, value2 in pairs(value) do
- fields[key][key2] = value2
- end
- else
- fields[key] = value
- end
- end
-
- if not fields.wield_image then fields.wield_image = fields.inventory_image end
-
- -- Entity fields override
- for key, value in pairs(model.entity_fields) do
- fields.display_entities["signs:display_text"][key] = value
- end
-
- minetest.register_node(mod..":"..name, fields)
-end
diff --git a/signs/compatibility.lua b/signs/compatibility.lua
index 3284230..dea8750 100644
--- a/signs/compatibility.lua
+++ b/signs/compatibility.lua
@@ -23,7 +23,7 @@
------------------------------------
local wallmounted_to_facedir = {
- [0]=1, -- Should not happend with signs
+ [0]=1, -- Should not happend with signs
[1]=1, -- Should not happend with signs
[2]=1,
[3]=3,
@@ -43,9 +43,9 @@ local function compatibility_check_1(pos, node)
node.name = convert_nodes[node.name]
if node.name then
node.param2 = wallmounted_to_facedir[node.param2]
- display_lib.on_destruct(pos)
+ display_api.on_destruct(pos)
minetest.swap_node(pos, node)
- display_lib.on_construct(pos)
+ display_api.on_construct(pos)
end
end
@@ -76,7 +76,7 @@ local function compatibility_check_2(pos, node)
end
end
-- Create new entity
- display_lib.update_entities(pos)
+ display_api.update_entities(pos)
end
minetest.register_lbm({ name = "signs:conpatibility_2",
@@ -84,7 +84,34 @@ minetest.register_lbm({ name = "signs:conpatibility_2",
action = compatibility_check_2,
})
+--Backwards compatibility API functions
+signs.set_display_text = function(...)
+ minetest.log("warning", "signs.set_display_text() is deprecated, please use signs_api.set_display_text() instead.")
+ return signs_api.set_display_text(...)
+end
+
+signs.set_formspec = function(...)
+ minetest.log("warning", "signs.set_formspec() is deprecated, please use signs_api.set_formspec() instead.")
+ return signs_api.set_formspec(...)
+end
+
+signs.on_receive_fields = function(...)
+ minetest.log("warning", "signs.on_receive_fields() is deprecated, please use signs_api.on_receive_fields() instead.")
+ return signs_api.on_receive_fields(...)
+end
+signs.on_place_direction = function(...)
+ minetest.log("warning", "signs.on_place_direction() is deprecated, please use signs_api.on_place_direction() instead.")
+ return signs_api.on_place_direction(...)
+end
+signs.on_rotate = function(...)
+ minetest.log("warning", "signs.on_rotate() is deprecated, please use signs_api.on_rotate() instead.")
+ return signs_api.on_rotate(...)
+end
+signs.register_sign = function(...)
+ minetest.log("warning", "signs.register_sign() is deprecated, please use signs_api.register_sign() instead.")
+ return signs_api.register_sign(...)
+end
diff --git a/signs/copyright.txt b/signs/copyright.txt
index d6f87c4..9e3b294 100644
--- a/signs/copyright.txt
+++ b/signs/copyright.txt
@@ -1,4 +1,10 @@
Code, Textures and Models by Pierre-Yves Rollo (pyrollo)
-intllib support (i18n) by fat115
+intllib support (i18n) by (fat115)
intllib fallback code and tools by Diego Martínez (kaeza)
-Extra contributors : (gpcf)
+Extra contributors:
+(gpcf)
+(Thomas--S)
+Translations:
+Muhammad Nur Hidayat Yasuyoshi (MuhdNurHidayat)
+(fat115)
+
diff --git a/signs/crafts.lua b/signs/crafts.lua
index b4e0206..ef82dbc 100644
--- a/signs/crafts.lua
+++ b/signs/crafts.lua
@@ -2,17 +2,60 @@ minetest.register_craft({
output = 'signs:wooden_right_sign',
recipe = {
{'group:wood', 'group:wood', 'group:wood'},
- {'group:wood', 'group:wood', ''},
+ {'group:wood', 'group:wood', 'dye:black'},
{'', '', ''},
}
})
minetest.register_craft({
+ output = 'signs:wooden_right_sign',
+ type = 'shapeless',
+ recipe = { 'signs:wooden_long_sign' }
+})
+
+minetest.register_craft({
+ output = 'signs:wooden_long_sign',
+ recipe = {
+ {'group:wood', 'dye:black', 'group:wood'},
+ {'group:wood', 'group:wood', 'group:wood'},
+ {'', '', ''},
+ }
+})
+
+minetest.register_craft({
+ output = 'signs:wooden_long_sign',
+ type = 'shapeless',
+ recipe = { 'signs:wooden_right_sign' }
+})
+
+minetest.register_craft({
+ output = 'signs:wooden_sign',
+ recipe = {
+ {'', 'dye:black', ''},
+ {'group:wood', 'group:wood', 'group:wood'},
+ {'group:wood', 'group:wood', 'group:wood'},
+ }
+})
+
+minetest.register_craft({
output = 'signs:paper_poster',
recipe = {
- {'default:paper', 'default:paper', ''},
+ {'default:paper', 'default:paper', 'dye:black'},
{'default:paper', 'default:paper', ''},
{'default:paper', 'default:paper', ''},
}
})
+minetest.register_craft({
+ output = 'signs:label_small',
+ recipe = {
+ {'default:paper', 'dye:black'},
+ }
+})
+
+minetest.register_craft({
+ output = 'signs:label_small',
+ recipe = {
+ {'default:paper', 'default:paper', 'dye:black'},
+ }
+})
diff --git a/signs/depends.txt b/signs/depends.txt
index 3feca07..aaf5bff 100644
--- a/signs/depends.txt
+++ b/signs/depends.txt
@@ -1,4 +1,6 @@
default
+dye
+display_api
+font_api
+signs_api
intllib?
-display_lib
-font_lib
diff --git a/signs/nodes.lua b/signs/nodes.lua
index ef7cea5..428da2e 100644
--- a/signs/nodes.lua
+++ b/signs/nodes.lua
@@ -23,10 +23,10 @@ local F = function(...) return minetest.formspec_escape(S(...)) end
-- Poster specific formspec
local function display_poster(pos, node, player)
- local formspec
local meta = minetest.get_meta(pos)
+
local def = minetest.registered_nodes[node.name].display_entities["signs:display_text"]
-
+
local p_text = meta:get_string("text")
local d_text = meta:get_string("display_text")
-- If orwell96's modified signs_lib version is available and sign macros are active,
@@ -35,48 +35,56 @@ local function display_poster(pos, node, player)
p_text = signs_lib.replace_macros(p_text)
d_text = signs_lib.replace_macros(d_text)
end
-
+
+ local font = font_api.get_font(meta:get_string("font") or def.font_name)
+
+ local fs
+ local fname = string.format("%s@%s:display",
+ node.name, minetest.pos_to_string(pos))
+
-- Title texture
- local titletexture = font_lib.make_multiline_texture(
- def.font_name, d_text,
- 116, 12, def.maxlines, def.valign, def.color)
-
-
- formspec =
- "size[7,9]"..
- "background[0,0;7,9;signs_poster_formspec.png]"..
- "image[0,0;8.4,1.5;"..titletexture.."]"..
- "textarea[0.3,1.5;7,8;;"..minetest.colorize("#111", minetest.formspec_escape(p_text))..";]"..
- "bgcolor[#0000]"
+ local titletexture = font:make_text_texture(
+ d_text, font:get_height()*8.4,
+ font:get_height(), 1, "center")
+
+ fs = string.format([=[
+ size[7,9]bgcolor[#0000]
+ background[0,0;7,9;signs_poster_formspec.png]
+ image[0,-0.2;8.4,2;%s]
+ textarea[0.3,1.5;7,8;;%s;]]=],
+ titletexture,
+ minetest.colorize("#111",
+ minetest.formspec_escape(p_text)))
if minetest.is_protected(pos, player:get_player_name()) then
- formspec = formspec..
- "button_exit[2.5,8;2,1;ok;"..F("Close").."]"
+ fs = string.format("%sbutton_exit[2.5,8;2,1;ok;%s]", fs, F("Close"))
else
- formspec = formspec..
- "button[1,8;2,1;edit;"..F("Edit").."]"..
- "button_exit[4,8;2,1;ok;"..F("Close").."]"
+ fs = string.format(
+ "%sbutton[1,8;2,1;edit;%s]button_exit[4,8;2,1;ok;%s]",
+ fs, F("Edit"), F("Close"))
end
- minetest.show_formspec(player:get_player_name(),
- node.name.."@"..minetest.pos_to_string(pos)..":display",
- formspec)
+ minetest.show_formspec(player:get_player_name(), fname, fs)
end
local function edit_poster(pos, node, player)
- local formspec
local meta = minetest.get_meta(pos)
+ local fs
+ local fname = string.format("%s@%s:edit",
+ node.name, minetest.pos_to_string(pos))
+
if not minetest.is_protected(pos, player:get_player_name()) then
- formspec =
- "size[6.5,7.5]"..
- "field[0.5,0.7;6,1;display_text;"..F("Title")..";"..
- minetest.formspec_escape(meta:get_string("display_text")).."]"..
- "textarea[0.5,1.7;6,6;text;"..F("Text")..";"..
- minetest.formspec_escape(meta:get_string("text")).."]"..
- "button_exit[2.25,7;2,1;write;"..F("Write").."]"
- minetest.show_formspec(player:get_player_name(),
- node.name.."@"..minetest.pos_to_string(pos)..":edit",
- formspec)
+ fs = string.format([=[
+ size[6.5,7.5]%s%s%s
+ field[0.5,0.7;6,1;display_text;%s;%s]
+ textarea[0.5,1.7;6,6;text;%s;%s]
+ button[1.25,7;2,1;font;%s]
+ button_exit[3.25,7;2,1;write;%s]]=],
+ default.gui_bg, default.gui_bg_img, default.gui_slots, F("Title"),
+ minetest.formspec_escape(meta:get_string("display_text")),
+ F("Text"), minetest.formspec_escape(meta:get_string("text")),
+ F("Title font"), F("Write"))
+ minetest.show_formspec(player:get_player_name(), fname, fs)
end
end
@@ -86,100 +94,167 @@ local function on_receive_fields_poster(pos, formname, fields, player)
local node = minetest.get_node(pos)
if not minetest.is_protected(pos, player:get_player_name()) and fields then
- if formname == node.name.."@"..minetest.pos_to_string(pos)..":display" and
- fields.edit then
+ if formname == node.name.."@"..minetest.pos_to_string(pos)..":display"
+ and fields.edit then
edit_poster(pos, node, player)
+ return true
end
- if formname == node.name.."@"..minetest.pos_to_string(pos)..":edit" and
- (fields.write or fields.key_enter) then
- meta:set_string("display_text", fields.display_text)
- meta:set_string("text", fields.text)
- meta:set_string("infotext", "\""..fields.display_text
- .."\"\n"..S("(right-click to read more text)"))
- display_lib.update_entities(pos)
- display_poster(pos, node, player)
+ if formname == node.name.."@"..minetest.pos_to_string(pos)..":edit"
+ then
+ if (fields.write or fields.font or fields.key_enter) then
+ meta:set_string("display_text", fields.display_text)
+ meta:set_string("text", fields.text)
+ meta:set_string("infotext", "\""..fields.display_text
+ .."\"\n"..S("(right-click to read more text)"))
+ display_api.update_entities(pos)
+ end
+ if (fields.write or fields.key_enter) then
+ display_poster(pos, node, player)
+ elseif (fields.font) then
+ font_api.show_font_list(player, pos, function (playername, pos)
+ local player = minetest.get_player_by_name(playername)
+ local node = minetest.get_node(pos)
+ if player and node then
+ edit_poster(pos, node, player)
+ end
+ end)
+ end
+ return true
end
end
end
-- Text entity for all signs
-display_lib.register_display_entity("signs:display_text")
+display_api.register_display_entity("signs:display_text")
-- Sign models and registration
local models = {
+ wooden_sign = {
+ depth = 1/16, width = 14/16, height = 12/16,
+ entity_fields = {
+ size = { x = 12/16, y = 10/16 },
+ maxlines = 3,
+ color = "#000",
+ },
+ node_fields = {
+ description = S("Wooden sign"),
+ tiles = { "signs_wooden.png" },
+ inventory_image = "signs_wooden_inventory.png",
+ groups= { dig_immediate = 2 },
+ },
+ },
+ wooden_long_sign = {
+ depth = 1/16, width = 1, height = 7/16,
+ entity_fields = {
+ size = { x = 1, y = 6/16 },
+ maxlines = 2,
+ color = "#000",
+ },
+ node_fields = {
+ description = S("Wooden long sign"),
+ tiles = { "signs_wooden_long.png", "signs_wooden_long.png",
+ "signs_wooden_long.png^[transformR90",
+ "signs_wooden_long.png^[transformR90",
+ "signs_wooden_long.png", "signs_wooden_long.png",
+ },
+ inventory_image = "signs_wooden_long_inventory.png",
+ groups= { dig_immediate = 2 },
+ },
+ },
wooden_right_sign = {
- depth = 1/16,
- width = 14/16,
- height = 7/16,
+ depth = 1/16, width = 14/16, height = 7/16,
entity_fields = {
- right = -3/32,
+ right = -3/32,
size = { x = 12/16, y = 6/16 },
- resolution = { x = 112, y = 64 },
maxlines = 2,
color="#000",
},
node_fields = {
description = S("Wooden direction sign"),
tiles = { "signs_wooden_direction.png" },
- inventory_image = "signs_wooden_inventory.png",
- signs_other_dir = 'signs:wooden_left_sign',
- on_place = signs.on_place_direction,
+ inventory_image = "signs_wooden_direction_inventory.png",
+ signs_other_dir = 'signs:wooden_left_sign',
+ on_place = signs_api.on_place_direction,
drawtype = "mesh",
mesh = "signs_dir_right.obj",
selection_box = { type="fixed", fixed = {-0.5, -7/32, 0.5, 7/16, 7/32, 7/16}},
collision_box = { type="fixed", fixed = {-0,5, -7/32, 0.5, 7/16, 7/32, 7/16}},
+ groups= { dig_immediate = 2 },
},
},
wooden_left_sign = {
- depth = 1/16,
- width = 14/16,
- height = 7/16,
+ depth = 1/16, width = 14/16, height = 7/16,
entity_fields = {
- right = 3/32,
+ right = 3/32,
size = { x = 12/16, y = 6/16 },
- resolution = { x = 112, y = 64 },
maxlines = 2,
color = "#000",
},
node_fields = {
description = S("Wooden direction sign"),
tiles = { "signs_wooden_direction.png" },
- inventory_image = "signs_wooden_inventory.png",
- signs_other_dir = 'signs:wooden_right_sign',
+ inventory_image = "signs_wooden_direction_inventory.png",
+ signs_other_dir = 'signs:wooden_right_sign',
drawtype = "mesh",
mesh = "signs_dir_left.obj",
selection_box = { type="fixed", fixed = {-7/16, -7/32, 0.5, 0.5, 7/32, 7/16}},
collision_box = { type="fixed", fixed = {-7/16, -7/32, 0.5, 0.5, 7/32, 7/16}},
- groups = { not_in_creative_inventory = 1 },
+ groups = { not_in_creative_inventory = 1, dig_immediate = 2 },
drop = "signs:wooden_right_sign",
},
},
paper_poster = {
- depth = 1/32,
- width = 26/32,
- height = 30/32,
+ depth = 1/32, width = 26/32, height = 30/32,
entity_fields = {
- resolution = { x = 144, y = 64 },
+ top = -11/32,
+ size = { x = 26/32, y = 6/32 },
maxlines = 1,
- color="#000",
- valign="top",
+ color = "#000",
},
node_fields = {
description = S("Poster"),
tiles = { "signs_poster_sides.png", "signs_poster_sides.png",
- "signs_poster_sides.png", "signs_poster_sides.png",
- "signs_poster_sides.png", "signs_poster.png" },
+ "signs_poster_sides.png", "signs_poster_sides.png",
+ "signs_poster_sides.png", "signs_poster.png" },
inventory_image = "signs_poster_inventory.png",
- on_construct = display_lib.on_construct,
+ groups= { dig_immediate = 3 },
+ on_construct = display_api.on_construct,
on_rightclick = display_poster,
on_receive_fields = on_receive_fields_poster,
},
},
+ label_small = {
+ depth = 1/32, width = 4/16, height = 4/16,
+ entity_fields = {
+ size = { x = 4/16, y = 4/16 },
+ maxlines = 1,
+ color = "#000",
+ },
+ node_fields = {
+ description = S("Small label"),
+ tiles = { "signs_label.png" },
+ inventory_image = "signs_label_small_inventory.png",
+ groups= { dig_immediate = 3 },
+ },
+ },
+ label_medium = {
+ depth = 1/32, width = 8/16, height = 8/16,
+ entity_fields = {
+ size = { x = 8/16, y = 8/16 },
+ maxlines = 2,
+ color = "#000",
+ },
+ node_fields = {
+ description = S("Label"),
+ tiles = { "signs_label.png" },
+ inventory_image = "signs_label_medium_inventory.png",
+ groups= { dig_immediate = 3 },
+ },
+ },
}
-- Node registration
for name, model in pairs(models)
do
- signs.register_sign("signs", name, model)
+ signs_api.register_sign("signs", name, model)
end
-
diff --git a/signs/svg/poster.svg b/signs/svg/poster.svg
index 4f6f774..cc9e8fd 100644
--- a/signs/svg/poster.svg
+++ b/signs/svg/poster.svg
@@ -15,8 +15,8 @@
height="32px"
id="svg2985"
version="1.1"
- inkscape:version="0.48.4 r9939"
- sodipodi:docname="affiche.svg"
+ inkscape:version="0.92.3 (2405546, 2018-03-11)"
+ sodipodi:docname="poster.svg"
inkscape:export-filename="/home/pyrollo/dev/minetest-mods/signs/textures/signs_poster.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
@@ -73,18 +73,18 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="11.197802"
- inkscape:cx="-4.798213"
- inkscape:cy="9.6735437"
- inkscape:current-layer="layer5"
+ inkscape:zoom="22.395604"
+ inkscape:cx="15.573035"
+ inkscape:cy="16.910322"
+ inkscape:current-layer="layer2"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
- inkscape:window-width="1239"
- inkscape:window-height="776"
- inkscape:window-x="41"
- inkscape:window-y="24"
- inkscape:window-maximized="1"
+ inkscape:window-width="1441"
+ inkscape:window-height="1038"
+ inkscape:window-x="2012"
+ inkscape:window-y="467"
+ inkscape:window-maximized="0"
showguides="true"
inkscape:guide-bbox="true"
inkscape:object-paths="true">
@@ -95,11 +95,13 @@
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
- spacingx="0.5px"
- spacingy="0.5px"
+ spacingx="0.5"
+ spacingy="0.5"
dotted="false"
color="#ff0000"
- opacity="0.1254902" />
+ opacity="0.1254902"
+ originx="0"
+ originy="0" />
</sodipodi:namedview>
<metadata
id="metadata2990">
@@ -109,7 +111,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
+ <dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
@@ -127,7 +129,7 @@
height="32.081406"
width="32.003735" />
<rect
- style="color:#000000;fill:#feffed;fill-opacity:0.76862745;fill-rule:nonzero;stroke:none;stroke-width:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#feffed;fill-opacity:0.76862745;fill-rule:nonzero;stroke:none;stroke-width:0;marker:none;enable-background:accumulate"
id="rect5482"
width="32"
height="32"
@@ -136,18 +138,22 @@
<flowRoot
xml:space="preserve"
id="flowRoot5628"
- style="font-size:4px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"><flowRegion
- id="flowRegion5630"><rect
+ style="font-style:normal;font-weight:normal;line-height:0.01%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
+ id="flowRegion5630"
+ style="font-family:sans-serif"><rect
id="rect5632"
width="3.6625218"
height="4.6728725"
x="12.692533"
- y="-10.876763" /></flowRegion><flowPara
- id="flowPara5634" /></flowRoot> </g>
+ y="-10.876763"
+ style="font-family:sans-serif" /></flowRegion><flowPara
+ id="flowPara5634"
+ style="font-size:4px;line-height:1.25;font-family:sans-serif"> </flowPara></flowRoot> </g>
<g
inkscape:groupmode="layer"
id="layer4"
- inkscape:label="Fond inv">
+ inkscape:label="Fond inv"
+ style="display:inline">
<image
style="display:inline"
y="-0.081405997"
@@ -158,7 +164,7 @@
width="32.003735"
clip-path="url(#clipPath4132)" />
<rect
- style="color:#000000;fill:#feffed;fill-opacity:0.76862745;fill-rule:nonzero;stroke:none;stroke-width:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#feffed;fill-opacity:0.76862745;fill-rule:nonzero;stroke:none;stroke-width:0;marker:none;enable-background:accumulate"
id="rect5482-0"
width="26"
height="30"
@@ -175,260 +181,284 @@
transform="matrix(1,0,0,1.3429336,0,-1.0576018)">
<text
transform="scale(0.85711508,1.1667045)"
- sodipodi:linespacing="125%"
id="text4138"
y="5.1426907"
x="18.756834"
- style="font-size:3.42846036px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
y="5.1426907"
x="18.756834"
id="tspan4140"
sodipodi:role="line"
- style="font-weight:bold;-inkscape-font-specification:Sans Bold">READ ME !</tspan></text>
+ style="font-weight:bold;font-size:3.42845988px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'Sans Bold'">READ ME !</tspan></text>
</g>
</g>
<g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Label frame"
+ style="display:none">
+ <rect
+ style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ff41c1;fill-opacity:0.41711228;fill-rule:nonzero;stroke:none;stroke-width:0.1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ id="rect4585"
+ width="16"
+ height="16"
+ x="8"
+ y="8"
+ ry="0"
+ inkscape:export-filename="/home/pyrollo/dev/minetest-mods/display_modpack/signs/textures/signs_label.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <rect
+ style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ff41c1;fill-opacity:0.41711228;fill-rule:nonzero;stroke:none;stroke-width:0.1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ id="rect4585-3"
+ width="8"
+ height="8"
+ x="12"
+ y="12"
+ ry="0" />
+ </g>
+ <g
id="layer1"
inkscape:label="Texte"
inkscape:groupmode="layer"
- style="display:inline">
+ style="display:none">
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 4,11.5 4,0"
+ d="M 4,11.5 H 8"
id="path2997-2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 7,9.5 4,0"
+ d="m 7,9.5 h 4"
id="path3017"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 12,9.5 1,0"
+ d="m 12,9.5 h 1"
id="path3019"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 14,9.5 3,0"
+ d="m 14,9.5 h 3"
id="path3021"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 18,9.5 4,0"
+ d="m 18,9.5 h 4"
id="path3023"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 23,9.5 1,0"
+ d="m 23,9.5 h 1"
id="path3025"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 25,9.5 3,0"
+ d="m 25,9.5 h 3"
id="path3027"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 9,11.5 3,0"
+ d="m 9,11.5 h 3"
id="path3029"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 13,11.5 1,0"
+ d="m 13,11.5 h 1"
id="path3031"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 15,11.5 4,0"
+ d="m 15,11.5 h 4"
id="path3033"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 20,11.5 3,0"
+ d="m 20,11.5 h 3"
id="path3035"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 24,11.5 1,0"
+ d="m 24,11.5 h 1"
id="path3037"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 26,11.5 2,0"
+ d="m 26,11.5 h 2"
id="path3039"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 4,13.5 1,0"
+ d="M 4,13.5 H 5"
id="path3041"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 6,13.5 7,0"
+ d="m 6,13.5 h 7"
id="path3043"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 17,13.5 -3,0"
+ d="M 17,13.5 H 14"
id="path3045"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 7,16.5 1,0"
+ d="M 7,16.5 H 8"
id="path3047"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 9,16.5 7,0"
+ d="m 9,16.5 h 7"
id="path3049"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 17,16.5 2,0"
+ d="m 17,16.5 h 2"
id="path3051"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 20,16.5 6,0"
+ d="m 20,16.5 h 6"
id="path3053"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 27,16.5 1,0"
+ d="m 27,16.5 h 1"
id="path3055"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 4,18.5 5,0"
+ d="M 4,18.5 H 9"
id="path3057"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 10,18.5 1,0"
+ d="m 10,18.5 h 1"
id="path3059"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 12,18.5 3,0"
+ d="m 12,18.5 h 3"
id="path3061"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 16,18.5 4,0"
+ d="m 16,18.5 h 4"
id="path3063"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 21,18.5 2,0"
+ d="m 21,18.5 h 2"
id="path3065"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 24,18.5 4,0"
+ d="m 24,18.5 h 4"
id="path3067"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 4,20.5 2,0"
+ d="M 4,20.5 H 6"
id="path3069"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 7,20.5 5,0"
+ d="m 7,20.5 h 5"
id="path3071"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 13,20.5 1,0"
+ d="m 13,20.5 h 1"
id="path3073"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 15,20.5 4,0"
+ d="m 15,20.5 h 4"
id="path3075"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 20,20.5 4,0"
+ d="m 20,20.5 h 4"
id="path3077"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 26,20.5 2,0"
+ d="m 26,20.5 h 2"
id="path3079"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 4,22.5 4,0"
+ d="M 4,22.5 H 8"
id="path3081"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 9,22.5 5,0"
+ d="m 9,22.5 h 5"
id="path3083"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 15,22.5 5,0"
+ d="m 15,22.5 h 5"
id="path3085"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 21,25.5 1,0"
+ d="m 21,25.5 h 1"
id="path3087"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 23,25.5 5,0"
+ d="m 23,25.5 h 5"
id="path3089"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 4,27.5 1,0"
+ d="M 4,27.5 H 5"
id="path3091"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 6,27.5 5,0"
+ d="m 6,27.5 h 5"
id="path3093"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 12,27.5 6,0"
+ d="m 12,27.5 h 6"
id="path3095"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 19,27.5 1,0"
+ d="m 19,27.5 h 1"
id="path3097"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 21,27.5 3,0"
+ d="m 21,27.5 h 3"
id="path3099"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 7,25.5 2,0"
+ d="M 7,25.5 H 9"
id="path3101"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 10,25.5 5,0"
+ d="m 10,25.5 h 5"
id="path3103"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 16,25.5 4,0"
+ d="m 16,25.5 h 4"
id="path3105"
inkscape:connector-curvature="0" />
</g>
diff --git a/signs/textures/signs_label.png b/signs/textures/signs_label.png
new file mode 100644
index 0000000..4cf7edc
--- /dev/null
+++ b/signs/textures/signs_label.png
Binary files differ
diff --git a/signs/textures/signs_label_medium_inventory.png b/signs/textures/signs_label_medium_inventory.png
new file mode 100644
index 0000000..9622201
--- /dev/null
+++ b/signs/textures/signs_label_medium_inventory.png
Binary files differ
diff --git a/signs/textures/signs_label_small_inventory.png b/signs/textures/signs_label_small_inventory.png
new file mode 100644
index 0000000..2dd60af
--- /dev/null
+++ b/signs/textures/signs_label_small_inventory.png
Binary files differ
diff --git a/signs/textures/signs_wooden.png b/signs/textures/signs_wooden.png
new file mode 100644
index 0000000..164948a
--- /dev/null
+++ b/signs/textures/signs_wooden.png
Binary files differ
diff --git a/signs/textures/signs_wooden_direction_inventory.png b/signs/textures/signs_wooden_direction_inventory.png
new file mode 100644
index 0000000..c4be3af
--- /dev/null
+++ b/signs/textures/signs_wooden_direction_inventory.png
Binary files differ
diff --git a/signs/textures/signs_wooden_inventory.png b/signs/textures/signs_wooden_inventory.png
index d997480..bb7e949 100644
--- a/signs/textures/signs_wooden_inventory.png
+++ b/signs/textures/signs_wooden_inventory.png
Binary files differ
diff --git a/signs/textures/signs_wooden_long.png b/signs/textures/signs_wooden_long.png
new file mode 100644
index 0000000..c23a56a
--- /dev/null
+++ b/signs/textures/signs_wooden_long.png
Binary files differ
diff --git a/signs/textures/signs_wooden_long_inventory.png b/signs/textures/signs_wooden_long_inventory.png
new file mode 100644
index 0000000..78d2545
--- /dev/null
+++ b/signs/textures/signs_wooden_long_inventory.png
Binary files differ