diff --git a/mods/ITEMS/mcl_signs/README.txt b/mods/ITEMS/mcl_signs/README.txt index ee161fc95..5ef65481c 100644 --- a/mods/ITEMS/mcl_signs/README.txt +++ b/mods/ITEMS/mcl_signs/README.txt @@ -1,4 +1,21 @@ -Mod based on reworked signs mod by PilzAdam: + +--- +# Mineclone2-Signs +--- +A reworking of MineClone 2's mcl_signs to be colorable and made to glow. Rquires Minetest and Mineclone2. +--- + +Created by Michieal (FaerRaven) @ DateTime: 10/14/22 4:05 PM + + +Reworked to be an API and to allow players to color, and/or make the lettering for the signs glow (be bright at night). +Reworked by Michieal (FaerRaven), including the sign textures batch changed to be white instead of the original black. + +A special thanks to Cora for pointing me in the right direction (as always). + + +The original Mod, MCL_SIGNS is based on reworked signs mod by PilzAdam: + https://forum.minetest.net/viewtopic.php?t=3289 License of code and font: MIT License @@ -6,8 +23,22 @@ License of code and font: MIT License Font source: 04.jp.org, some modifications and additions were made (added support for Latin-1 Supplement) Original font license text states: “YOU MAY USE THEM AS YOU LIKE” (in about.gif file distributed with the font) -License of textures: See README.md in top directory of MineClone 2. +License of textures: See README.md in top directory of MineClone 2, with the exception of the following: +default_sign.png, default_sign_dark.png, default_sign_greyscale.png, mcl_signs_sign_dark.png, +mcl_signs_sign_greyscale.png are licensed as follows: +Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) (https://creativecommons.org/licenses/by-sa/4.0/). +Credit Michieal (Faerraven). The extra sign textures are provided for you to use, modify, etc., with the goal being to +make the game better. (All of these textures were changed / created by me, to make them usable / better.) License of models: GPLv3 (https://www.gnu.org/licenses/gpl-3.0.html) + Models author: 22i. + Source: https://github.com/22i/amc + +Mineclone 2 source code: +https://git.minetest.land/MineClone2/MineClone2 + +--- +NOTE: This MODule requires Glow Squids in order for all features to work 100% correctly. Glow Squids are currently +in review by the MineClone 2 Team, and should be available soon after this initial release of the new signs. \ No newline at end of file diff --git a/mods/ITEMS/mcl_signs/SIGNS_API_DOC.txt b/mods/ITEMS/mcl_signs/SIGNS_API_DOC.txt new file mode 100644 index 000000000..e98741137 --- /dev/null +++ b/mods/ITEMS/mcl_signs/SIGNS_API_DOC.txt @@ -0,0 +1,122 @@ +--- +--- Generated by EmmyLua. +--- Created by Michieal (FaerRaven). +--- DateTime: 10/22/22 3:44 PM +--- + +SIGNS API + +--- How to Use: + +The simplest way to create a new sign is to use mcl_signs.register_sign [mcl_signs.register_sign (modname, color, _name, +ttsign)]. It's an all-in-one sign creator. It makes use of the standard textures for the signs, and colors them based on +the color code that you give it, and names it "mcl_signs:wall_sign" + _name. So, using the spruce sign to illustrate, it +would be named "mcl_signs:wall_sign_sprucewood", as we made _name equal to "_sprucewood" after the name of the +registered wood. + +To create a sign with specific textures: use the mcl_signs.register_sign_custom [mcl_signs.register_sign_custom +(modname, _name, tiles, color, inventory_image, wield_image, ttsign)]. Like the register_sign() function, this is also an +all-in-one sign creation function. With this function you can designate what textures to use, and give them a specified +color. This function follows the same naming conventions. + +If you wish to override / recreate one of the predefined signs, you may also do that. The reregister_sign() and +reregister_sign_custom() functions will replace an existing sign's definition with a new one. Caution, ONLY use this on +existing signs. If the sign doesn't exist, use the regular register_sign* functions. + +--- What the parameters mean, and what they do: + +* modname: optional (pass "" or "false" to ignore), for using mcl_signs with other mods to allow the creation of a sign +from the mod's wood (if installed). Use this to prevent failures of the specific mod is not installed that has the needed +information (textures, wood, etc.) Setting this is important, because it prevents items from being registered if the +mod in not installed. + +* tiles: the texture file to use for the sign's node. + +* color: color the texture file to use with this color. Use white (#FFFFFF) to negate the color, and just use the +texture as is. + +* inventory_image: the texture file to use for the sign's display in inventory. + +* wield_image: the texture file to use for the sign's weilded (in hand) object. + +* _name: the sign's name suffix, such as "_dark" or "_sprucewood", etc., appended to "wall_sign" or "standing_sign" + +* ttsign: the tool tip of the sign that gets translated. Shown when the mouse hovers the inventory sign. ttsign stands +for translated tooltip sign. + +* wood_item_string: example: "mcl_core:wood", "mcl_core:sprucewood" or "mymod:mywood". This is used when defining the +recipe for the sign. + +--- Other Functions of Importance: + +* register_dye [mcl_signs.register_dye (modname, item_name, color_code)] -- this registers a new dye that the sign knows +about so that the player can color their signs with the dye. +Parameters: + modname: your mod / module's name. make sure to use this for compatibility. + item_name: the item_string of the dye to register. + color_code: the hex code for the color to make the lettering. Also called HTML color code. Ex. "#FFFFFF" is white. + +* register_sign_craft [mcl_signs.register_sign_craft(modname, wood_item_string, _name)] -- this is what creates the +recipes for the sign, and makes the sign "burnable". Typically called right after the register_sign* functions. +Parameters: + _name: MUST be the same name as used for the sign. So, if your sign _name is "_sprucewood" then this should be too. + wood_item_string: the item_string of the wood to use for the sign's recipe. Example: "mcl_core:wood" (default oak). + modname: like with the other functions that has this parameter, used to make sure that nothing breaks. + +* make_lbm() [mcl_signs.make_lbm()] -- This innocuous function is very important. This is the function that makes the +signs work after reloading the game. This function is the last to be called in your sign creation work flow. Note, you +do not need to call this function after every definition, just at the end of the last definition. +(See Example WorkFlow below.) + +--- Example Workflow for sign creation. + +* these are, at the time of writing, a selection of the actual signs' definitions. Note the functions called, and when. + +-- ---------------------------- -- +-- Register Signs for use. -- +-- ---------------------------- -- + +-- sprucewood Sign +mcl_signs.register_sign_custom("mcl_core", "_sprucewood", + "mcl_signs_sign_dark.png","#ffffff", "default_sign_dark.png", + "default_sign_dark.png", "Spruce Sign" +) +mcl_signs.register_sign_craft("mcl_core", "mcl_core:sprucewood", "_sprucewood") + +-- darkwood Sign +mcl_signs.register_sign_custom("mcl_core", "_darkwood", + "mcl_signs_sign_greyscale.png","#856443", "default_sign_greyscale.png", + "default_sign_greyscale.png", "Dark Oak Sign" +) +mcl_signs.register_sign_craft("mcl_core", "mcl_core:darkwood", "_darkwood") + +-- acaciawood Sign +mcl_signs.register_sign("mcl_core", "#ea7479", "_acaciawood", "Acacia Sign") +mcl_signs.register_sign_craft("mcl_core", "mcl_core:acaciawood", "_acaciawood") + +-- junglewood Sign +mcl_signs.register_sign("mcl_core", "#866249", "_junglewood", "Jungle Sign") +mcl_signs.register_sign_craft("mcl_core", "mcl_core:junglewood", "_junglewood") + +-- Register the LBMs for the created signs. +mcl_signs.make_lbm() + +--- ----------------------------------------------------------------------------- + +* If you wish to use a recipe other than the standard sign recipe, you will need to define your own recipe. In doing so, +use this output line: + output = "mcl_signs:wall_sign" .. _name .. " 3", +where _name is the same string that you have used throughout your sign's workflow. That way, when players make the recipe, +they get your sign (x3). + +--- Future landmarks on the horizon for the Signs API: + +* Once the forthcoming Hanging Signs are in Minecraft, and we implement the code for them in here, hanging signs will +automatically exist as part of the signs' package. You won't have to change any of your code, it'll just be more +functional. :) + +* if you have suggestions, comments, etc., please contact me on MineClone 2's Discord server. + +And that... is all there is to it! + +-- written by Michieal. \ No newline at end of file diff --git a/mods/ITEMS/mcl_signs/init.lua b/mods/ITEMS/mcl_signs/init.lua index b6bfb3fe8..6643b978a 100644 --- a/mods/ITEMS/mcl_signs/init.lua +++ b/mods/ITEMS/mcl_signs/init.lua @@ -1,580 +1,139 @@ +--- +--- Generated by EmmyLua. +--- Created by Michieal (FaerRaven). +--- DateTime: 10/14/22 4:05 PM +--- + local modname = minetest.get_current_modname() local modpath = minetest.get_modpath(modname) + +-- Signs API +dofile(modpath .. "/signs_api.lua") + +-- LOCALIZATION local S = minetest.get_translator(modname) -local F = minetest.formspec_escape - -local table = table - --- Load the characters map (characters.txt) ---[[ File format of characters.txt: -It's an UTF-8 encoded text file that contains metadata for all supported characters. It contains a sequence of info blocks, one for each character. Each info block is made out of 3 lines: -Line 1: The literal UTF-8 encoded character -Line 2: Name of the texture file for this character minus the “.png” suffix; found in the “textures/” sub-directory -Line 3: Currently ignored. Previously this was for the character width in pixels - -After line 3, another info block may follow. This repeats until the end of the file. - -All character files must be 5 or 6 pixels wide (5 pixels are preferred) -]] - -local chars_file = io.open(modpath.."/characters.txt", "r") --- FIXME: Support more characters (many characters are missing). Currently ASCII and Latin-1 Supplement are supported. -local charmap = {} -if not chars_file then - minetest.log("error", "[mcl_signs] : character map file not found") -else - while true do - local char = chars_file:read("*l") - if char == nil then - break - end - local img = chars_file:read("*l") - chars_file:read("*l") - charmap[char] = img - end -end - --- CONSTANTS -local SIGN_WIDTH = 115 - -local LINE_LENGTH = 15 -local NUMBER_OF_LINES = 4 - -local LINE_HEIGHT = 14 -local CHAR_WIDTH = 5 - - --- Helper functions -local function round(num, idp) - local mult = 10^(idp or 0) - return math.floor(num * mult + 0.5) / mult -end - -local function string_to_array(str) - local tab = {} - for i=1,string.len(str) do - table.insert(tab, string.sub(str, i,i)) - end - return tab -end - -local function string_to_line_array(str) - local tab = {} - local current = 1 - local linechar = 1 - tab[1] = "" - for _,char in ipairs(string_to_array(str)) do - -- New line - if char == "\n" then - current = current + 1 - tab[current] = "" - linechar = 1 - else - tab[current] = tab[current]..char - linechar = linechar + 1 - end - end - return tab -end - -local function create_lines(text) - local line_num = 1 - local tab = {} - for _, line in ipairs(string_to_line_array(text)) do - if line_num > NUMBER_OF_LINES then - break - end - table.insert(tab, line) - line_num = line_num + 1 - end - return tab -end - -local function generate_line(s, ypos) - local i = 1 - local parsed = {} - local width = 0 - local chars = 0 - local printed_char_width = CHAR_WIDTH + 1 - while chars < LINE_LENGTH and i <= #s do - local file - -- Get and render character - if charmap[s:sub(i, i)] then - file = charmap[s:sub(i, i)] - i = i + 1 - elseif i < #s and charmap[s:sub(i, i + 1)] then - file = charmap[s:sub(i, i + 1)] - i = i + 2 - else - -- No character image found. - -- Use replacement character: - file = "_rc" - i = i + 1 - minetest.log("verbose", "[mcl_signs] Unknown symbol in '"..s.."' at "..i) - end - if file then - width = width + printed_char_width - table.insert(parsed, file) - chars = chars + 1 - end - end - width = width - 1 - - local texture = "" - local xpos = math.floor((SIGN_WIDTH - width) / 2) - for i = 1, #parsed do - texture = texture..":"..xpos..","..ypos.."="..parsed[i]..".png" - xpos = xpos + printed_char_width - end - return texture -end - -local function generate_texture(lines, signnodename) - local texture = "[combine:"..SIGN_WIDTH.."x"..SIGN_WIDTH - local ypos - if signnodename == "mcl_signs:wall_sign" then - ypos = 30 - else - ypos = 0 - end - for i = 1, #lines do - texture = texture..generate_line(lines[i], ypos) - ypos = ypos + LINE_HEIGHT - end - return texture -end - -local n = 23/56 - 1/128 - -local signtext_info_wall = { - {delta = {x = 0, y = 0, z = n}, yaw = 0}, - {delta = {x = n, y = 0, z = 0}, yaw = math.pi / -2}, - {delta = {x = 0, y = 0, z = -n}, yaw = math.pi}, - {delta = {x = -n, y = 0, z = 0}, yaw = math.pi / 2}, -} - -local signtext_info_standing = {} - -local m = -1/16 + 1/64 - -for rot=0, 15 do - local yaw = math.pi*2 - (((math.pi*2) / 16) * rot) - local delta = vector.multiply(minetest.yaw_to_dir(yaw), m) - -- Offset because sign is a bit above node boundaries - delta.y = delta.y + 2/28 - table.insert(signtext_info_standing, { delta = delta, yaw = yaw }) -end - -local function get_rotation_level(facedir, nodename) - local rl = facedir * 4 - if nodename == "mcl_signs:standing_sign22_5" then - rl = rl + 1 - elseif nodename == "mcl_signs:standing_sign45" then - rl = rl + 2 - elseif nodename == "mcl_signs:standing_sign67_5" then - rl = rl + 3 - end - return rl -end - -local function get_wall_signtext_info(param2, nodename) - local dir = minetest.wallmounted_to_dir(param2) - if dir.x > 0 then - return 2 - elseif dir.z > 0 then - return 1 - elseif dir.x < 0 then - return 4 - else - return 3 - end -end - -local sign_groups = {handy=1,axey=1, deco_block=1, material_wood=1, attached_node=1, dig_by_piston=1, flammable=-1} - -local function destruct_sign(pos) - local objects = minetest.get_objects_inside_radius(pos, 0.5) - for _, v in ipairs(objects) do - local ent = v:get_luaentity() - if ent and ent.name == "mcl_signs:text" then - v:remove() - end - end - local players = minetest.get_connected_players() - for p=1, #players do - if vector.distance(players[p]:get_pos(), pos) <= 30 then - minetest.close_formspec(players[p]:get_player_name(), "mcl_signs:set_text_"..pos.x.."_"..pos.y.."_"..pos.z) - end - end -end - -local function update_sign(pos, fields, sender, force_remove) - local meta = minetest.get_meta(pos) - if not meta then - return - end - local text = meta:get_string("text") - if fields and (text == "" and fields.text) then - meta:set_string("text", fields.text) - text = fields.text - end - if text == nil then - text = "" - end - - local sign_info - local n = minetest.get_node(pos) - local nn = n.name - if nn == "mcl_signs:standing_sign" or nn == "mcl_signs:standing_sign22_5" or nn == "mcl_signs:standing_sign45" or nn == "mcl_signs:standing_sign67_5" then - sign_info = signtext_info_standing[get_rotation_level(n.param2, nn) + 1] - elseif nn == "mcl_signs:wall_sign" then - sign_info = signtext_info_wall[get_wall_signtext_info(n.param2)] - end - if sign_info == nil then - minetest.log("error", "[mcl_signs] Missing sign_info!") - return - end - - local objects = minetest.get_objects_inside_radius(pos, 0.5) - local text_entity - for _, v in ipairs(objects) do - local ent = v:get_luaentity() - if ent and ent.name == "mcl_signs:text" then - if force_remove then - v:remove() - else - text_entity = v - break - end - end - end - - if not text_entity then - text_entity = minetest.add_entity({ - x = pos.x + sign_info.delta.x, - y = pos.y + sign_info.delta.y, - z = pos.z + sign_info.delta.z}, "mcl_signs:text") - end - text_entity:get_luaentity()._signnodename = nn - text_entity:set_properties({textures={generate_texture(create_lines(text), nn)}}) - - text_entity:set_yaw(sign_info.yaw) -end - -local function show_formspec(player, pos) - minetest.show_formspec( - player:get_player_name(), - "mcl_signs:set_text_"..pos.x.."_"..pos.y.."_"..pos.z, - "size[6,3]textarea[0.25,0.25;6,1.5;text;"..F(S("Enter sign text:"))..";]label[0,1.5;"..F(S("Maximum line length: 15")).."\n"..F(S("Maximum lines: 4")).."]button_exit[0,2.5;6,1;submit;"..F(S("Done")).."]" - ) -end +-- HANDLE THE FORMSPEC CALLBACK minetest.register_on_player_receive_fields(function(player, formname, fields) - if formname:find("mcl_signs:set_text_") == 1 then - local x, y, z = formname:match("mcl_signs:set_text_(.-)_(.-)_(.*)") - local pos = {x=tonumber(x), y=tonumber(y), z=tonumber(z)} - if not pos or not pos.x or not pos.y or not pos.z then return end - update_sign(pos, fields, player) - end + if formname:find("mcl_signs:set_text_") == 1 then + local x, y, z = formname:match("mcl_signs:set_text_(.-)_(.-)_(.*)") + local pos = { x = tonumber(x), y = tonumber(y), z = tonumber(z) } + if not pos or not pos.x or not pos.y or not pos.z then + return + end + mcl_signs:update_sign(pos, fields, player) + end end) -local node_sounds -if minetest.get_modpath("mcl_sounds") then - node_sounds = mcl_sounds.node_sound_wood_defaults() -end - -minetest.register_node("mcl_signs:wall_sign", { - description = S("Sign"), - _tt_help = S("Can be written"), - _doc_items_longdesc = S("Signs can be written and come in two variants: Wall sign and sign on a sign post. Signs can be placed on the top and the sides of other blocks, but not below them."), - _doc_items_usagehelp = S("After placing the sign, you can write something on it. You have 4 lines of text with up to 15 characters for each line; anything beyond these limits is lost. Not all characters are supported. The text can not be changed once it has been written; you have to break and place the sign again."), - inventory_image = "default_sign.png", - walkable = false, - is_ground_content = false, - wield_image = "default_sign.png", - node_placement_prediction = "", - paramtype = "light", - sunlight_propagates = true, - paramtype2 = "wallmounted", - drawtype = "mesh", - mesh = "mcl_signs_signonwallmount.obj", - selection_box = {type = "wallmounted", wall_side = {-0.5, -7/28, -0.5, -23/56, 7/28, 0.5}}, - tiles = {"mcl_signs_sign.png"}, - use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false, - groups = sign_groups, - stack_max = 16, - sounds = node_sounds, - - on_place = function(itemstack, placer, pointed_thing) - local above = pointed_thing.above - local under = pointed_thing.under - - -- Use pointed node's on_rightclick function first, if present - local node_under = minetest.get_node(under) - if placer and not placer:get_player_control().sneak then - if minetest.registered_nodes[node_under.name] and minetest.registered_nodes[node_under.name].on_rightclick then - return minetest.registered_nodes[node_under.name].on_rightclick(under, node_under, placer, itemstack) or itemstack - end - end - - local dir = vector.subtract(under, above) - - -- Only build when it's legal - local abovenodedef = minetest.registered_nodes[minetest.get_node(above).name] - if not abovenodedef or abovenodedef.buildable_to == false then - return itemstack - end - - local wdir = minetest.dir_to_wallmounted(dir) - - --local placer_pos = placer:get_pos() - - local fdir = minetest.dir_to_facedir(dir) - - local sign_info - local nodeitem = ItemStack(itemstack) - -- Ceiling - if wdir == 0 then - --how would you add sign to ceiling? - return itemstack - -- Floor - elseif wdir == 1 then - -- Standing sign - - -- Determine the sign rotation based on player's yaw - local yaw = math.pi*2 - placer:get_look_horizontal() - - -- Select one of 16 possible rotations (0-15) - local rotation_level = round((yaw / (math.pi*2)) * 16) - - if rotation_level > 15 then - rotation_level = 0 - elseif rotation_level < 0 then - rotation_level = 15 - end - - -- The actual rotation is a combination of predefined mesh and facedir (see node definition) - if rotation_level % 4 == 0 then - nodeitem:set_name("mcl_signs:standing_sign") - elseif rotation_level % 4 == 1 then - nodeitem:set_name("mcl_signs:standing_sign22_5") - elseif rotation_level % 4 == 2 then - nodeitem:set_name("mcl_signs:standing_sign45") - elseif rotation_level % 4 == 3 then - nodeitem:set_name("mcl_signs:standing_sign67_5") - end - fdir = math.floor(rotation_level / 4) - - -- Place the node! - local _, success = minetest.item_place_node(nodeitem, placer, pointed_thing, fdir) - if not success then - return itemstack - end - if not minetest.is_creative_enabled(placer:get_player_name()) then - itemstack:take_item() - end - sign_info = signtext_info_standing[rotation_level + 1] - -- Side - else - -- Wall sign - local _, success = minetest.item_place_node(itemstack, placer, pointed_thing, wdir) - if not success then - return itemstack - end - sign_info = signtext_info_wall[fdir + 1] - end - - -- Determine spawn position of entity - local place_pos - if minetest.registered_nodes[node_under.name].buildable_to then - place_pos = under - else - place_pos = above - end - - local text_entity = minetest.add_entity({ - x = place_pos.x + sign_info.delta.x, - y = place_pos.y + sign_info.delta.y, - z = place_pos.z + sign_info.delta.z}, "mcl_signs:text") - text_entity:set_yaw(sign_info.yaw) - text_entity:get_luaentity()._signnodename = nodeitem:get_name() - - minetest.sound_play({name="default_place_node_hard", gain=1.0}, {pos = place_pos}, true) - - show_formspec(placer, place_pos) - return itemstack - end, - on_destruct = destruct_sign, - on_punch = function(pos, node, puncher) - update_sign(pos) - end, - on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - local r = screwdriver.rotate.wallmounted(pos, node, mode) - node.param2 = r - minetest.swap_node(pos, node) - update_sign(pos, nil, nil, true) - return true - else - return false - end - end, - _mcl_hardness = 1, - _mcl_blast_resistance = 1, -}) - --- Standing sign nodes. --- 4 rotations at 0°, 22.5°, 45° and 67.5°. --- These are 4 out of 16 possible rotations. --- With facedir the remaining 12 rotations are constructed. - --- 0° -local ssign = { - paramtype = "light", - use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false, - sunlight_propagates = true, - walkable = false, - is_ground_content = false, - paramtype2 = "facedir", - drawtype = "mesh", - mesh = "mcl_signs_sign.obj", - selection_box = {type = "fixed", fixed = {-0.2, -0.5, -0.2, 0.2, 0.5, 0.2}}, - tiles = {"mcl_signs_sign.png"}, - groups = sign_groups, - drop = "mcl_signs:wall_sign", - stack_max = 16, - sounds = node_sounds, - - on_destruct = destruct_sign, - on_punch = function(pos, node, puncher) - update_sign(pos) - end, - on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign22_5" - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - update_sign(pos, nil, nil, true) - return true - end, - - _mcl_hardness = 1, - _mcl_blast_resistance = 1, -} - -minetest.register_node("mcl_signs:standing_sign", ssign) - --- 22.5° -local ssign22_5 = table.copy(ssign) -ssign22_5.mesh = "mcl_signs_sign22.5.obj" -ssign22_5.on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign45" - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - update_sign(pos, nil, nil, true) - return true -end -minetest.register_node("mcl_signs:standing_sign22_5", ssign22_5) - --- 45° -local ssign45 = table.copy(ssign) -ssign45.mesh = "mcl_signs_sign45.obj" -ssign45.on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign67_5" - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - update_sign(pos, nil, nil, true) - return true -end -minetest.register_node("mcl_signs:standing_sign45", ssign45) - --- 67.5° -local ssign67_5 = table.copy(ssign) -ssign67_5.mesh = "mcl_signs_sign67.5.obj" -ssign67_5.on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign" - node.param2 = (node.param2 + 1) % 4 - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - update_sign(pos, nil, nil, true) - return true -end -minetest.register_node("mcl_signs:standing_sign67_5", ssign67_5) - +-- This defines the text entity for the lettering of the sign. -- FIXME: Prevent entity destruction by /clearobjects minetest.register_entity("mcl_signs:text", { - pointable = false, - visual = "upright_sprite", - textures = {}, - physical = false, - collide_with_objects = false, + pointable = false, + visual = "upright_sprite", + textures = {}, + physical = false, + collide_with_objects = false, - _signnodename = nil, -- node name of sign node to which the text belongs + _signnodename = nil, -- node name of sign node to which the text belongs - on_activate = function(self, staticdata) - if staticdata and staticdata ~= "" then - local des = minetest.deserialize(staticdata) - if des then - self._signnodename = des._signnodename - end - end - local meta = minetest.get_meta(self.object:get_pos()) - local text = meta:get_string("text") - self.object:set_properties({ - textures={generate_texture(create_lines(text), self._signnodename)}, - }) - self.object:set_armor_groups({ immortal = 1 }) - end, - get_staticdata = function(self) - local out = { _signnodename = self._signnodename } - return minetest.serialize(out) - end, + on_activate = function(self, staticdata) + + local meta = minetest.get_meta(self.object:get_pos()) + local text = meta:get_string("text") + local text_color = meta:get_string("mcl_signs:text_color") + local glowing_sign = meta:get_string("mcl_signs:glowing_sign") + if staticdata and staticdata ~= "" then + local des = minetest.deserialize(staticdata) + if des then + self._signnodename = des._signnodename + if des._text_color ~= nil and des._text_color ~= "" then + self.text_color = des._text_color + end + if des._glowing_sign ~= nil and des._glowing_sign ~= "" then + self.glowing_sign = des._glowing_sign + end + end + end + + if text_color == "" or text_color == nil then + text_color = "#000000" -- default to black text. + meta:set_string("mcl_signs:text_color", text_color) + end + + if glowing_sign == "" or glowing_sign == nil then + glowing_sign = "false" -- default to not glowing. + meta:set_string("mcl_signs:glowing_sign", glowing_sign) + end + + self.object:set_properties({ + textures = { mcl_signs:create_lettering(text, self._signnodename, text_color) }, + }) + if glowing_sign == "true" then + self.object:set_properties({ + glow = 6, --sign_glow, + }) + end + + self.object:set_armor_groups({ immortal = 1 }) + + end, + get_staticdata = function(self) + local out = { + _signnodename = self._signnodename, + } + return minetest.serialize(out) + end, }) -minetest.register_craft({ - type = "fuel", - recipe = "mcl_signs:wall_sign", - burntime = 10, -}) +-- Build the signs x,y,z & rotations so that they work. (IE, do not remove!) +mcl_signs.build_signs_info() -if minetest.get_modpath("mcl_core") then - minetest.register_craft({ - output = "mcl_signs:wall_sign 3", - recipe = { - {"group:wood", "group:wood", "group:wood"}, - {"group:wood", "group:wood", "group:wood"}, - {"", "mcl_core:stick", ""}, - } - }) -end +-- ---------------------------- -- +-- Register Signs for use. -- +-- ---------------------------- -- -if minetest.get_modpath("doc") then - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign") - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign22_5") - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign45") - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign67_5") -end +-- Standard (original) Sign +mcl_signs.register_sign("mcl_core", "#ffffff", "", "Sign") +mcl_signs.register_sign_craft("mcl_core", "mcl_core:wood", "") +-- birchwood Sign "#d5cb8d" / "#ffdba7" +mcl_signs.register_sign_custom("mcl_core", "_birchwood", + "mcl_signs_sign_greyscale.png","#ffdba7", "default_sign_greyscale.png", + "default_sign_greyscale.png", "Birch Sign" +) +mcl_signs.register_sign_craft("mcl_core", "mcl_core:birchwood", "_birchwood") + +-- sprucewood Sign +mcl_signs.register_sign_custom("mcl_core", "_sprucewood", + "mcl_signs_sign_dark.png","#ffffff", "default_sign_dark.png", + "default_sign_dark.png", "Spruce Sign" +) +mcl_signs.register_sign_craft("mcl_core", "mcl_core:sprucewood", "_sprucewood") + +-- darkwood Sign "#291f1a" / "#856443" +mcl_signs.register_sign_custom("mcl_core", "_darkwood", + "mcl_signs_sign_greyscale.png","#856443", "default_sign_greyscale.png", + "default_sign_greyscale.png", "Dark Oak Sign" +) +mcl_signs.register_sign_craft("mcl_core", "mcl_core:darkwood", "_darkwood") + +-- junglewood Sign +mcl_signs.register_sign("mcl_core", "#866249", "_junglewood", "Jungle Sign") +mcl_signs.register_sign_craft("mcl_core", "mcl_core:junglewood", "_junglewood") + +-- acaciawood Sign "b8693d" +mcl_signs.register_sign("mcl_core", "#ea7479", "_acaciawood", "Acacia Sign") +mcl_signs.register_sign_craft("mcl_core", "mcl_core:acaciawood", "_acaciawood") + +-- mangrove_wood Sign "#c7545c" +mcl_signs.register_sign("mcl_core", "#b8693d", "_mangrove_wood", "Mangrove Sign") +mcl_signs.register_sign_craft("mcl_core", "mcl_core:mangrove_wood", "_mangrove_wood") + +-- Register the LBMs for the created signs. +mcl_signs.make_lbm() + +-- really ancient compatibility. minetest.register_alias("signs:sign_wall", "mcl_signs:wall_sign") minetest.register_alias("signs:sign_yard", "mcl_signs:standing_sign") - -minetest.register_lbm({ - name = "mcl_signs:respawn_entities", - label = "Respawn sign text entities", - run_at_every_load = true, - nodenames = { "mcl_signs:wall_sign", "mcl_signs:standing_sign", "mcl_signs:standing_sign22_5", "mcl_signs:standing_sign45", "mcl_signs:standing_sign67_5" }, - action = function(pos, node) - update_sign(pos) - end, -}) +minetest.register_alias("mcl_signs:wall_sign_dark", "mcl_signs:wall_sign_sprucewood") +minetest.register_alias("mcl_signs:standing_sign_dark", "mcl_signs:standing_sign_sprucewood") diff --git a/mods/ITEMS/mcl_signs/locale/template.txt b/mods/ITEMS/mcl_signs/locale/template.txt index 6635e989f..7336db4f4 100644 --- a/mods/ITEMS/mcl_signs/locale/template.txt +++ b/mods/ITEMS/mcl_signs/locale/template.txt @@ -1,7 +1,7 @@ # textdomain: mcl_signs Sign= Signs can be written and come in two variants: Wall sign and sign on a sign post. Signs can be placed on the top and the sides of other blocks, but not below them.= -After placing the sign, you can write something on it. You have 4 lines of text with up to 15 characters for each line; anything beyond these limits is lost. Not all characters are supported. The text can not be changed once it has been written; you have to break and place the sign again.= +After placing the sign, you can write something on it. You have 4 lines of text with up to 15 characters for each line; anything beyond these limits is lost. Not all characters are supported. The text can not be changed once it has been written; you have to break and place the sign again. Can be colored and made to glow.= Enter sign text:= Maximum line length: 15= Maximum lines: 4= diff --git a/mods/ITEMS/mcl_signs/mod.conf b/mods/ITEMS/mcl_signs/mod.conf index 1af689d7b..ada0ae58a 100644 --- a/mods/ITEMS/mcl_signs/mod.conf +++ b/mods/ITEMS/mcl_signs/mod.conf @@ -1,2 +1,4 @@ name = mcl_signs -optional_depends = mcl_sounds, mcl_core, doc +description = New and Improved signs - can be colored and made to glow. +depends = mcl_core, mcl_sounds, mcl_dye, mcl_colors +optional_depends = doc diff --git a/mods/ITEMS/mcl_signs/signs_api.lua b/mods/ITEMS/mcl_signs/signs_api.lua new file mode 100644 index 000000000..b5643a1c2 --- /dev/null +++ b/mods/ITEMS/mcl_signs/signs_api.lua @@ -0,0 +1,1878 @@ +--- +--- Generated by EmmyLua. +--- Created by Michieal (FaerRaven). +--- DateTime: 10/14/22 4:05 PM +--- + +--local logging = minetest.settings:get_bool("mcl_logging_mcl_signs",true) + +local DEBUG = minetest.settings:get_bool("mcl_logging_mcl_signs", true) -- special debug setting. +local table = table -- copied from the original signs init file. + +if DEBUG then + minetest.log("action", "[mcl_signs] Signs API Loading") +end + +-- LOCALIZATION +local S = minetest.get_translator("mcl_signs") +-- Signs form +local F = minetest.formspec_escape + +-- PATHs +local modpath = minetest.get_modpath("mcl_signs") + +-- CONSTANTS +local SIGN_WIDTH = 115 + +local LINE_LENGTH = 15 +local NUMBER_OF_LINES = 4 + +local LINE_HEIGHT = 14 +local CHAR_WIDTH = 5 +-- ----------------------- + +-- CACHE NODE_SOUNDS +local node_sounds +if minetest.get_modpath("mcl_sounds") then + node_sounds = mcl_sounds.node_sound_wood_defaults() +end + +-- SET UP THE CHARACTER MAPPING +-- Load the characters map (characters.txt) +--[[ File format of characters.txt: +It's an UTF-8 encoded text file that contains metadata for all supported characters. It contains a sequence of info + blocks, one for each character. Each info block is made out of 3 lines: +Line 1: The literal UTF-8 encoded character +Line 2: Name of the texture file for this character minus the “.png” suffix; found in the “textures/” sub-directory +Line 3: Currently ignored. Previously this was for the character width in pixels + +After line 3, another info block may follow. This repeats until the end of the file. + +All character files must be 5 or 6 pixels wide (5 pixels are preferred) +]] + +local chars_file = io.open(modpath .. "/characters.txt", "r") +-- FIXME: Support more characters (many characters are missing). Currently ASCII and Latin-1 Supplement are supported. +local charmap = {} +if not chars_file then + minetest.log("error", "[mcl_signs] : character map file not found") +else + while true do + local char = chars_file:read("*l") + if char == nil then + break + end + local img = chars_file:read("*l") + chars_file:read("*l") + charmap[char] = img + end +end + +local pi = 3.1415926 -- enough accuracy, to build an engine for a car. + +-- locally cached copy of the official colors; this way, it updates as mcl_colors updates. +local mcl_colors_official = mcl_colors +if DEBUG then + minetest.log("verbose", "[mcl_signs]Official MCL_Colors:\n" .. dump(mcl_colors_official)) +end + +-- INITIALIZE THE GLOBAL API FOR SIGNS. +mcl_signs = {} + +-- GLOBALS +mcl_signs.sign_groups = { handy = 1, axey = 1, deco_block = 1, material_wood = 1, attached_node = 1, dig_by_piston = 1, flammable = -1 } +--- colors used for wools. +mcl_signs.mcl_wool_colors = { + unicolor_white = "#FFFFFF", + unicolor_dark_orange = "#502A00", + unicolor_grey = "#5B5B5B", + unicolor_darkgrey = "#303030", + unicolor_blue = "#0000CC", + unicolor_dark_green = "#005000", + unicolor_green_or_lime = "#50CC00", + unicolor_violet_purple = "#5000CC", + unicolor_light_red_pink = "#FF5050", + unicolor_yellow = "#CCCC00", + unicolor_orange = "#CC5000", + unicolor_red = "#CC0000", + unicolor_cyan = "#00CCCC", + unicolor_red_violet_magenta = "#CC0050", + unicolor_black = "#000000", + unicolor_light_blue = "#5050FF", +} +mcl_signs.signtext_info_wall = {} +mcl_signs.signtext_info_standing = {} -- built in build_signs_info(). +-- the rotational levels for all of the standing signs. +mcl_signs.standing_rotation_levels = {} + +-- data structure block for dynamically registered signs. +mcl_signs.registered_signs = {} +mcl_signs.registered_signs.wall_signs = {} +mcl_signs.registered_signs.standing_signs = {} +mcl_signs.registered_signs.hanging_signs = {} -- unused. prepping for future use. +-- DEFINE SIGN BASE TYPES +mcl_signs.wall_standard = {} -- initialize +mcl_signs.standing_standard = {} -- initialize + +function mcl_signs.build_signs_info() + local n = 23 / 56 - 1 / 128 -- some required magic number from the original code. + local m = -1 / 16 + 1 / 64 -- " " " " " " " " + + mcl_signs.signtext_info_wall = { + { delta = { x = 0, y = 0, z = n }, yaw = 0 }, + { delta = { x = n, y = 0, z = 0 }, yaw = pi / -2 }, + { delta = { x = 0, y = 0, z = -n }, yaw = pi }, + { delta = { x = -n, y = 0, z = 0 }, yaw = pi / 2 }, + } + + -- PLACE YAW VALUES INTO THE TABLE. + for rot = 0, 15 do + local yaw = pi * 2 - (((pi * 2) / 16) * rot) + local delta = vector.multiply(minetest.yaw_to_dir(yaw), m) + -- Offset because sign is a bit above node boundaries + delta.y = delta.y + 2 / 28 + table.insert(mcl_signs.signtext_info_standing, { delta = delta, yaw = yaw }) + end + +end + +-- wall signs' & hanging signs' base (definition) +mcl_signs.wall_standard = { + description = S("Sign"), + _tt_help = S("Can be written"), + _doc_items_longdesc = S("Signs can be written and come in two variants: Wall sign and sign on a sign post. Signs can be placed on the top and the sides of other blocks, but not below them."), + _doc_items_usagehelp = S("After placing the sign, you can write something on it. You have 4 lines of text with up to 15 characters for each line; anything beyond these limits is lost. Not all characters are supported. The text can not be changed once it has been written; you have to break and place the sign again. Can be colored and made to glow."), + inventory_image = "default_sign.png", + walkable = false, + is_ground_content = false, + wield_image = "default_sign.png", + node_placement_prediction = "", + paramtype = "light", + sunlight_propagates = true, + paramtype2 = "wallmounted", + drawtype = "mesh", + mesh = "mcl_signs_signonwallmount.obj", + selection_box = { type = "wallmounted", wall_side = { -0.5, -7 / 28, -0.5, -23 / 56, 7 / 28, 0.5 } }, + tiles = { "mcl_signs_sign.png" }, + use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false, + groups = mcl_signs.sign_groups, + stack_max = 16, + sounds = node_sounds, + + on_place = function(itemstack, placer, pointed_thing) + local above = pointed_thing.above + local under = pointed_thing.under + + -- Use pointed node's on_rightclick function first, if present + local node_under = minetest.get_node(under) + if placer and not placer:get_player_control().sneak then + if minetest.registered_nodes[node_under.name] and minetest.registered_nodes[node_under.name].on_rightclick then + return minetest.registered_nodes[node_under.name].on_rightclick(under, node_under, placer, itemstack) or itemstack + end + end + + local dir = vector.subtract(under, above) + + -- Only build when it's legal + local abovenodedef = minetest.registered_nodes[minetest.get_node(above).name] + if not abovenodedef or abovenodedef.buildable_to == false then + return itemstack + end + + local wdir = minetest.dir_to_wallmounted(dir) + + --local placer_pos = placer:get_pos() + + local fdir = minetest.dir_to_facedir(dir) + + local sign_info + local nodeitem = ItemStack(itemstack) + -- Ceiling + if wdir == 0 then + --how would you add sign to ceiling? + return itemstack + -- Floor + end + + if wdir == 1 then + -- Standing sign + + -- Determine the sign rotation based on player's yaw + local yaw = pi * 2 - placer:get_look_horizontal() + + -- Select one of 16 possible rotations (0-15) + local rotation_level = mcl_signs:round((yaw / (pi * 2)) * 16) + + if rotation_level > 15 then + rotation_level = 0 + elseif rotation_level < 0 then + rotation_level = 15 + end + + -- The actual rotation is a combination of predefined mesh and facedir (see node definition) + if rotation_level % 4 == 0 then + nodeitem:set_name("mcl_signs:standing_sign") + elseif rotation_level % 4 == 1 then + nodeitem:set_name("mcl_signs:standing_sign22_5") + elseif rotation_level % 4 == 2 then + nodeitem:set_name("mcl_signs:standing_sign45") + elseif rotation_level % 4 == 3 then + nodeitem:set_name("mcl_signs:standing_sign67_5") + end + fdir = math.floor(rotation_level / 4) + + -- Place the node! + local _, success = minetest.item_place_node(nodeitem, placer, pointed_thing, fdir) + if not success then + return itemstack + end + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item() + end + sign_info = mcl_signs.signtext_info_standing[rotation_level + 1] + -- Side + else + -- Wall sign + local _, success = minetest.item_place_node(itemstack, placer, pointed_thing, wdir) + if not success then + return itemstack + end + sign_info = mcl_signs.signtext_info_wall[fdir + 1] + end + + -- Determine spawn position of entity + local place_pos + if minetest.registered_nodes[node_under.name].buildable_to then + place_pos = under + else + place_pos = above + end + + local text_entity = minetest.add_entity({ + x = place_pos.x + sign_info.delta.x, + y = place_pos.y + sign_info.delta.y, + z = place_pos.z + sign_info.delta.z }, "mcl_signs:text") + text_entity:set_yaw(sign_info.yaw) + text_entity:get_luaentity()._signnodename = nodeitem:get_name() + if DEBUG then + minetest.log("verbose", "[mcl_signs]Placed position:" .. dump(place_pos) .. "\nSign_info: " .. dump(sign_info)) + end + + minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true) + + mcl_signs:show_formspec(placer, place_pos) + return itemstack + end, + on_destruct = function(pos) + mcl_signs:destruct_sign(pos) + end, + + -- Not Useless Code. force updates the sign. + on_punch = function(pos, node, puncher) + mcl_signs:update_sign(pos) + if DISINTEGRATE then + mcl_signs:destruct_sign(pos) + end + end, + on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + local r = screwdriver.rotate.wallmounted(pos, node, mode) + node.param2 = r + minetest.swap_node(pos, node) + mcl_signs:update_sign(pos, nil, nil, true) + return true + else + return false + end + end, + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + if DEBUG then + minetest.log("verbose", "[mcl_signs] Wall_Sign Right Click event.") + end + + -- make sure player is clicking + if not clicker or not clicker:is_player() then + return + end + + local item = clicker:get_wielded_item() + local iname = item:get_name() + + if node then + if DEBUG then + minetest.log("verbose", "[mcl_signs] Wall_Sign Right Click event on valid node.") + end + + -- handle glow from glow_ink_sac *first* + if (iname == "mcl_mobitems:glow_ink_sac") then + clicker:set_wielded_item(item) + local success = mcl_signs:glow_sign(pos) + if success then + if DEBUG then + minetest.log("verbose", "[mcl_signs] Sign Glow Success.") + end + itemstack:take_item() + end + return + end + + -- "mcl_dye:black" is a special case: it makes the sign's lettering black AND removes glow. + if (iname == "mcl_dye:black") then + clicker:set_wielded_item(item) + local success = mcl_signs:glow_sign(pos, true) + mcl_signs:color_sign(pos, mcl_colors.BLACK) + if success then + if DEBUG then + minetest.log("verbose", "[mcl_signs] Sign Glow removal Success.") + end + + itemstack:take_item() + end + return + end + + -- check the wielded item to make sure that it is a dye. + local txt_color = mcl_signs:get_color_for_sign(iname) + if txt_color ~= "false" then + clicker:set_wielded_item(item) + local success = mcl_signs:color_sign(pos, txt_color) + if success then + if DEBUG then + minetest.log("verbose", "[mcl_signs] Sign Color Success.") + end + itemstack:take_item() + end + end + end + end, + + _mcl_hardness = 1, + _mcl_blast_resistance = 1, +} +-- standing sign base (definition) +mcl_signs.standing_standard = { + paramtype = "light", + use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false, + sunlight_propagates = true, + walkable = false, + is_ground_content = false, + paramtype2 = "facedir", + drawtype = "mesh", + mesh = "mcl_signs_sign.obj", + selection_box = { type = "fixed", fixed = { -0.2, -0.5, -0.2, 0.2, 0.5, 0.2 } }, + tiles = { "mcl_signs_sign.png" }, + groups = mcl_signs.sign_groups, + drop = "mcl_signs:wall_sign", + stack_max = 16, + sounds = node_sounds, + + on_destruct = function(pos) + mcl_signs:destruct_sign(pos) + end, + + -- Not Useless Code. this force updates the sign. + on_punch = function(pos, node, puncher) + mcl_signs:update_sign(pos) + if DISINTEGRATE then + mcl_signs:destruct_sign(pos) + end + end, + on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign22_5" + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end, + + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + + if DEBUG then + minetest.log("verbose", "[mcl_signs] Standing_Sign Right Click event.") + end + + -- make sure player is clicking + if not clicker or not clicker:is_player() then + return + end + + local item = clicker:get_wielded_item() + local iname = item:get_name() + + if node then + -- handle glow from glow_ink_sac *first* + if DEBUG then + minetest.log("verbose", "[mcl_signs] Standing_Sign Right Click event on valid node.") + end + + if (iname == "mcl_mobitems:glow_ink_sac") then + clicker:set_wielded_item(item) + local success = mcl_signs:glow_sign(pos) + if success then + if DEBUG then + minetest.log("verbose", "[mcl_signs] Sign Glow Success.") + end + itemstack:take_item() + end + return + end + + -- check the wielded item to make sure that it is a dye. + local txt_color = mcl_signs:get_color_for_sign(iname) + if txt_color ~= "false" then + clicker:set_wielded_item(item) + local success = mcl_signs:color_sign(pos, txt_color) + if success then + if DEBUG then + minetest.log("verbose", "[mcl_signs] Sign Color Success.") + end + itemstack:take_item() + end + end + end + end, + + _mcl_hardness = 1, + _mcl_blast_resistance = 1, +} + +-- HELPER FUNCTIONS' VARIABLES +local sign_glow = 6 +local Dyes_table = { + { "mcl_dye:aqua", mcl_colors_official.AQUA }, + { "mcl_dye:black", mcl_colors_official.BLACK }, + { "mcl_dye:blue", mcl_colors_official.BLUE }, + { "mcl_dye:brown", mcl_colors_official.brown }, + { "mcl_dye:cyan", mcl_signs.mcl_wool_colors.unicolor_cyan }, + { "mcl_dye:green", mcl_colors_official.GREEN }, + { "mcl_dye:dark_green", mcl_colors_official.DARK_GREEN }, + { "mcl_dye:grey", mcl_colors_official.GRAY }, + { "mcl_dye:dark_grey", mcl_colors_official.DARK_GRAY }, + { "mcl_dye:lightblue", mcl_signs.mcl_wool_colors.unicolor_light_blue }, + { "mcl_dye:lime", mcl_signs.unicolor_green_or_lime }, + { "mcl_dye:magenta", mcl_colors_official.LIGHT_PURPLE }, + { "mcl_dye:orange", mcl_signs.mcl_wool_colors.unicolor_orange }, + { "mcl_dye:pink", mcl_signs.mcl_wool_colors.unicolor_light_red_pink }, + { "mcl_dye:purple", mcl_colors_official.LIGHT_PURPLE }, + { "mcl_dye:red", mcl_signs.mcl_wool_colors.unicolor_red }, + { "mcl_dye:silver", mcl_signs.mcl_wool_colors.unicolor_grey }, + { "mcl_dye:violet", mcl_colors_official.DARK_PURPLE }, + { "mcl_dye:white", mcl_colors_official.WHITE }, + { "mcl_dye:yellow", mcl_colors_official.YELLOW }, +} + +local function update_sign_registry(type, name) + if type == "wall" then + table.insert(mcl_signs.registered_signs.wall_signs, name) + end + if type == "standing" then + table.insert(mcl_signs.registered_signs.standing_signs, name) + end + if type == "hanging" then + table.insert(mcl_signs.registered_signs.hanging_signs, name) + end +end + +function mcl_signs.make_lbm() + + local registered_sign_nodenames = {} + + for i = 0, #mcl_signs.registered_signs.wall_signs do + table.insert(registered_sign_nodenames, mcl_signs.registered_signs.wall_signs[i]) + end + + for i = 0, #mcl_signs.registered_signs.standing_signs do + table.insert(registered_sign_nodenames, mcl_signs.registered_signs.standing_signs[i]) + end + + for i = 0, #mcl_signs.registered_signs.hanging_signs do + table.insert(registered_sign_nodenames, mcl_signs.registered_signs.hanging_signs[i]) + end + + -- the above is not yet used. + minetest.register_lbm({ + name = "mcl_signs:respawn_entities", + label = "Respawn sign text entities", + run_at_every_load = true, + nodenames = registered_sign_nodenames , + action = function(pos, node) + mcl_signs:update_sign(pos) + end, + }) + +end + +function mcl_signs.register_dye (modname, item_name, color_code) + if minetest.get_modpath(modname) then + table.insert(Dyes_table, { item_name, color_code }) + end +end + +--- Register a new sign, tint the textures, and gives it an unique node name. Creates both wall and standing signs. +--- modname: optional (pass "" or "false" to ignore), for use with other mods to +--- allow the creation of a sign from the mod's wood (if installed). +--- +--- color: the color code to color the base sign textures. must be a valid html color code. +--- +--- _name: the sign's name suffix, such as "_dark" or "_red", etc., appended to "wall_sign" or "standing_sign" +--- +--- ttsign: the tool tip of the sign that gets translated. Shown when the mouse hovers the inventory sign. +--- For example: the basic, default oak (wood) sign is just "Sign"; and a spruce sign would be "Spruce Sign" +function mcl_signs.register_sign (modname, color, _name, ttsign) + local mod_name_pass = false + if modname ~= "" and modname ~= "false" then + if minetest.get_modpath(modname) then + mod_name_pass = true + end + if mod_name_pass == false then + return + end + end + local new_sign = {} + + if color == nil or color == "" then + color = "#FFFFFF" + end + + new_sign = table.copy(mcl_signs.wall_standard) + new_sign.description = S(ttsign) + + new_sign.wield_image = "(default_sign.png^[multiply:" .. color .. ")" + new_sign.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" } + new_sign.inventory_image = "(default_sign.png^[multiply:" .. color .. ")" + + -- currently have to do this, because of how the base node placement works. + new_sign.on_place = function(itemstack, placer, pointed_thing) + local above = pointed_thing.above + local under = pointed_thing.under + + -- Use pointed node's on_rightclick function first, if present + local node_under = minetest.get_node(under) + if placer and not placer:get_player_control().sneak then + if minetest.registered_nodes[node_under.name] and minetest.registered_nodes[node_under.name].on_rightclick then + return minetest.registered_nodes[node_under.name].on_rightclick(under, node_under, placer, itemstack) or itemstack + end + end + + local dir = vector.subtract(under, above) + + -- Only build when it's legal + local abovenodedef = minetest.registered_nodes[minetest.get_node(above).name] + if not abovenodedef or abovenodedef.buildable_to == false then + return itemstack + end + + local wdir = minetest.dir_to_wallmounted(dir) + local fdir = minetest.dir_to_facedir(dir) + + local sign_info + local nodeitem = ItemStack(itemstack) + -- Ceiling + if wdir == 0 then + --how would you add sign to ceiling? + return itemstack + -- Floor + elseif wdir == 1 then + -- Standing sign + + -- Determine the sign rotation based on player's yaw + local yaw = pi * 2 - placer:get_look_horizontal() + + -- Select one of 16 possible rotations (0-15) + local rotation_level = mcl_signs:round((yaw / (pi * 2)) * 16) + + if rotation_level > 15 then + rotation_level = 0 + elseif rotation_level < 0 then + rotation_level = 15 + end + + -- The actual rotation is a combination of predefined mesh and facedir (see node definition) + if rotation_level % 4 == 0 then + nodeitem:set_name("mcl_signs:standing_sign" .. _name) + elseif rotation_level % 4 == 1 then + nodeitem:set_name("mcl_signs:standing_sign22_5" .. _name) + elseif rotation_level % 4 == 2 then + nodeitem:set_name("mcl_signs:standing_sign45" .. _name) + elseif rotation_level % 4 == 3 then + nodeitem:set_name("mcl_signs:standing_sign67_5" .. _name) + end + fdir = math.floor(rotation_level / 4) + + -- Place the node! + local _, success = minetest.item_place_node(nodeitem, placer, pointed_thing, fdir) + if not success then + return itemstack + end + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item() + end + sign_info = mcl_signs.signtext_info_standing[rotation_level + 1] + -- Side + else + -- Wall sign + local _, success = minetest.item_place_node(itemstack, placer, pointed_thing, wdir) + if not success then + return itemstack + end + sign_info = mcl_signs.signtext_info_wall[fdir + 1] + end + + -- Determine spawn position of entity + local place_pos + if minetest.registered_nodes[node_under.name].buildable_to then + place_pos = under + else + place_pos = above + end + + if DEBUG then + minetest.log("action", "[mcl_signs] Register_Sign::Placed position:" .. dump(place_pos) .. "\nSign_info: " .. dump(sign_info)) + end + + local text_entity = minetest.add_entity({ + x = place_pos.x + sign_info.delta.x, + y = place_pos.y + sign_info.delta.y, + z = place_pos.z + sign_info.delta.z }, "mcl_signs:text") + text_entity:set_yaw(sign_info.yaw) + text_entity:get_luaentity()._signnodename = nodeitem:get_name() + + minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true) + + mcl_signs:show_formspec(placer, place_pos) + return itemstack + end + + minetest.register_node("mcl_signs:wall_sign" .. _name, new_sign) + update_sign_registry("wall", "mcl_signs:wall_sign" .. _name) + + -- debug step + if DEBUG then + minetest.log("action", "[mcl_signs] Registered: mcl_signs:wall_sign" .. _name .. color .. "\n" .. dump(new_sign)) + minetest.log("action", "[mcl_signs] mcl_signs:wall_sign_standard\n" .. dump(mcl_signs.wall_standard)) + end + + -- standing sign base. + local new_sign_standing = {} + new_sign_standing = table.copy(mcl_signs.standing_standard) + new_sign_standing.drop = "mcl_signs:wall_sign" .. _name + new_sign_standing.wield_image = "(default_sign.png^[multiply:" .. color .. ")" + new_sign_standing.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" } + new_sign_standing.inventory_image = "(default_sign.png^[multiply:" .. color .. ")" + minetest.register_node("mcl_signs:standing_sign" .. _name, new_sign_standing) + update_sign_registry("standing", "mcl_signs:standing_sign" .. _name) + -- debug step + if DEBUG then + minetest.log("action", "[mcl_signs] Registered: mcl_signs:standing_sign" .. _name .. color .. "\n" .. dump(new_sign_standing)) + end + + -- 22.5° + local ssign22_5d = table.copy(new_sign_standing) + ssign22_5d.mesh = "mcl_signs_sign22.5.obj" + ssign22_5d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign45" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.register_node("mcl_signs:standing_sign22_5" .. _name, ssign22_5d) + update_sign_registry("standing", "mcl_signs:standing_sign22_5" .. _name) + + -- 45° + local ssign45d = table.copy(new_sign_standing) + ssign45d.mesh = "mcl_signs_sign45.obj" + ssign45d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign67_5" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.register_node("mcl_signs:standing_sign45" .. _name, ssign45d) + update_sign_registry("standing", "mcl_signs:standing_sign45" .. _name) + + -- 67.5° + local ssign67_5d = table.copy(new_sign_standing) + ssign67_5d.mesh = "mcl_signs_sign67.5.obj" + ssign67_5d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign" .. _name + node.param2 = (node.param2 + 1) % 4 + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.register_node("mcl_signs:standing_sign67_5" .. _name, ssign67_5d) + update_sign_registry("standing", "mcl_signs:standing_sign67_5" .. _name) + + -- register Doc entry + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:wall_sign" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign22_5" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign45" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign67_5" .. _name) + end + + --register standing sign's rotation_levels + table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign22_5" .. _name , 1}) + table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign45" .. _name , 2}) + table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign67_5" .. _name , 3}) +end + +--- The same as register_sign, except caller defines the textures. Note, there is a greyscale version of the sign, +--- called "default_sign_greyscale.png" and "mcl_signs_sign_greyscale.png" for optional use in the textures directory. +--- +--- modname: optional (pass "" or "false" to ignore), for use with other mods to +--- allow the creation of a sign from the mod's wood (if installed). +--- +--- _name: the sign's name suffix, such as "_dark" or "_red", etc., appended to "wall_sign" or "standing_sign" +--- +--- tiles: the texture file to use for the sign. +--- +--- color: color the texture file to use with this color. Use white (#FFFFFF) to negate the color, +--- and just use the texture as is +--- +--- inventory_image: the texture file to use for the sign's display in inventory. +--- +--- wield_image: the texture file to use for the sign's weilded (in hand) object. +--- +--- inventory_image: the image used for in-inventory and in hand. +--- +--- ttsign: the tool tip of the sign that gets translated. Shown when the mouse hovers the inventory sign. +--- For example: the basic, default oak (wood) sign is just "Sign"; and a spruce sign would be "Spruce Sign" +function mcl_signs.register_sign_custom (modname, _name, tiles, color, inventory_image, wield_image, ttsign) + local mod_name_pass = false + if modname ~= "" and modname ~= "false" then + if minetest.get_modpath(modname) then + mod_name_pass = true + end + if mod_name_pass == false then + return + end + end + local new_sign = {} + + new_sign = table.copy(mcl_signs.wall_standard) + + new_sign.wield_image ="("..wield_image.."^[multiply:" .. color .. ")" + new_sign.tiles = { "("..tiles.."^[multiply:" .. color .. ")" } + new_sign.inventory_image = "("..inventory_image.."^[multiply:" .. color .. ")" + new_sign.description = S(ttsign) + -- currently have to do this, because of how the base node placement works. + new_sign.on_place = function(itemstack, placer, pointed_thing) + local above = pointed_thing.above + local under = pointed_thing.under + + -- Use pointed node's on_rightclick function first, if present + local node_under = minetest.get_node(under) + if placer and not placer:get_player_control().sneak then + if minetest.registered_nodes[node_under.name] and minetest.registered_nodes[node_under.name].on_rightclick then + return minetest.registered_nodes[node_under.name].on_rightclick(under, node_under, placer, itemstack) or itemstack + end + end + + local dir = vector.subtract(under, above) + + -- Only build when it's legal + local abovenodedef = minetest.registered_nodes[minetest.get_node(above).name] + if not abovenodedef or abovenodedef.buildable_to == false then + return itemstack + end + + local wdir = minetest.dir_to_wallmounted(dir) + local fdir = minetest.dir_to_facedir(dir) + + local sign_info + local nodeitem = ItemStack(itemstack) + -- Ceiling + if wdir == 0 then + --how would you add sign to ceiling? + return itemstack + -- Floor + elseif wdir == 1 then + -- Standing sign + + -- Determine the sign rotation based on player's yaw + local yaw = pi * 2 - placer:get_look_horizontal() + + -- Select one of 16 possible rotations (0-15) + local rotation_level = mcl_signs:round((yaw / (pi * 2)) * 16) + + if rotation_level > 15 then + rotation_level = 0 + elseif rotation_level < 0 then + rotation_level = 15 + end + + -- The actual rotation is a combination of predefined mesh and facedir (see node definition) + if rotation_level % 4 == 0 then + nodeitem:set_name("mcl_signs:standing_sign" .. _name) + elseif rotation_level % 4 == 1 then + nodeitem:set_name("mcl_signs:standing_sign22_5" .. _name) + elseif rotation_level % 4 == 2 then + nodeitem:set_name("mcl_signs:standing_sign45" .. _name) + elseif rotation_level % 4 == 3 then + nodeitem:set_name("mcl_signs:standing_sign67_5" .. _name) + end + fdir = math.floor(rotation_level / 4) + + -- Place the node! + local _, success = minetest.item_place_node(nodeitem, placer, pointed_thing, fdir) + if not success then + return itemstack + end + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item() + end + sign_info = mcl_signs.signtext_info_standing[rotation_level + 1] + -- Side + else + -- Wall sign + local _, success = minetest.item_place_node(itemstack, placer, pointed_thing, wdir) + if not success then + return itemstack + end + sign_info = mcl_signs.signtext_info_wall[fdir + 1] + end + + -- Determine spawn position of entity + local place_pos + if minetest.registered_nodes[node_under.name].buildable_to then + place_pos = under + else + place_pos = above + end + + local text_entity = minetest.add_entity({ + x = place_pos.x + sign_info.delta.x, + y = place_pos.y + sign_info.delta.y, + z = place_pos.z + sign_info.delta.z }, "mcl_signs:text") + text_entity:set_yaw(sign_info.yaw) + text_entity:get_luaentity()._signnodename = nodeitem:get_name() + + minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true) + + mcl_signs:show_formspec(placer, place_pos) + return itemstack + end + minetest.register_node("mcl_signs:wall_sign" .. _name, new_sign) + update_sign_registry("wall", "mcl_signs:wall_sign" .. _name) + + -- standing sign base. + local new_sign_standing = {} + new_sign_standing = table.copy(mcl_signs.standing_standard) + new_sign_standing.drop = "mcl_signs:wall_sign" .. _name + new_sign_standing.wield_image ="("..wield_image.."^[multiply:" .. color .. ")" + new_sign_standing.tiles = { "("..tiles.."^[multiply:" .. color .. ")" } + new_sign_standing.inventory_image = "("..inventory_image.."^[multiply:" .. color .. ")" + minetest.register_node("mcl_signs:standing_sign" .. _name, new_sign_standing) + update_sign_registry("standing", "mcl_signs:standing_sign" .. _name) + + -- 22.5° + local ssign22_5d = table.copy(new_sign_standing) + ssign22_5d.mesh = "mcl_signs_sign22.5.obj" + ssign22_5d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign45" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.register_node("mcl_signs:standing_sign22_5" .. _name, ssign22_5d) + update_sign_registry("standing", "mcl_signs:standing_sign22_5" .. _name) + + -- 45° + local ssign45d = table.copy(new_sign_standing) + ssign45d.mesh = "mcl_signs_sign45.obj" + ssign45d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign67_5" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.register_node("mcl_signs:standing_sign45" .. _name, ssign45d) + update_sign_registry("standing", "mcl_signs:standing_sign45" .. _name) + + -- 67.5° + local ssign67_5d = table.copy(new_sign_standing) + ssign67_5d.mesh = "mcl_signs_sign67.5.obj" + ssign67_5d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign" .. _name + node.param2 = (node.param2 + 1) % 4 + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.register_node("mcl_signs:standing_sign67_5" .. _name, ssign67_5d) + update_sign_registry("standing", "mcl_signs:standing_sign67_5" .. _name) + + -- register Doc entry + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:wall_sign" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign22_5" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign45" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign67_5" .. _name) + end + + --register standing sign's rotation_levels + table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign22_5" .. _name , 1}) + table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign45" .. _name , 2}) + table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign67_5" .. _name , 3}) + +end + +--- Override an existing sign, tint the textures, and gives it an unique node name. Creates both wall and standing signs. +--- modname: optional (pass "" or "false" to ignore), for use with other mods to +--- allow the creation of a sign from the mod's wood (if installed). +--- +--- color: the color code to color the base sign textures. must be a valid html color code. +--- +--- _name: the sign's name suffix, such as "_dark" or "_red", etc., appended to "wall_sign" or "standing_sign" +--- +--- ttsign: the tool tip of the sign that gets translated. Shown when the mouse hovers the inventory sign. +--- For example: the basic, default oak (wood) sign is just "Sign"; and a spruce sign would be "Spruce Sign" +function mcl_signs.reregister_sign (modname, color, _name, ttsign) + local mod_name_pass = false + if modname ~= "" and modname ~= "false" then + if minetest.get_modpath(modname) then + mod_name_pass = true + end + if mod_name_pass == false then + return + end + end + local new_sign = {} + + if color == nil or color == "" then + color = "#FFFFFF" + end + + new_sign = table.copy(mcl_signs.wall_standard) + new_sign.description = S(ttsign) + + new_sign.wield_image = "(default_sign.png^[multiply:" .. color .. ")" + new_sign.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" } + new_sign.inventory_image = "(default_sign.png^[multiply:" .. color .. ")" + + -- currently have to do this, because of how the base node placement works. + new_sign.on_place = function(itemstack, placer, pointed_thing) + local above = pointed_thing.above + local under = pointed_thing.under + + -- Use pointed node's on_rightclick function first, if present + local node_under = minetest.get_node(under) + if placer and not placer:get_player_control().sneak then + if minetest.registered_nodes[node_under.name] and minetest.registered_nodes[node_under.name].on_rightclick then + return minetest.registered_nodes[node_under.name].on_rightclick(under, node_under, placer, itemstack) or itemstack + end + end + + local dir = vector.subtract(under, above) + + -- Only build when it's legal + local abovenodedef = minetest.registered_nodes[minetest.get_node(above).name] + if not abovenodedef or abovenodedef.buildable_to == false then + return itemstack + end + + local wdir = minetest.dir_to_wallmounted(dir) + local fdir = minetest.dir_to_facedir(dir) + + local sign_info + local nodeitem = ItemStack(itemstack) + -- Ceiling + if wdir == 0 then + --how would you add sign to ceiling? + return itemstack + -- Floor + elseif wdir == 1 then + -- Standing sign + + -- Determine the sign rotation based on player's yaw + local yaw = pi * 2 - placer:get_look_horizontal() + + -- Select one of 16 possible rotations (0-15) + local rotation_level = mcl_signs:round((yaw / (pi * 2)) * 16) + + if rotation_level > 15 then + rotation_level = 0 + elseif rotation_level < 0 then + rotation_level = 15 + end + + -- The actual rotation is a combination of predefined mesh and facedir (see node definition) + if rotation_level % 4 == 0 then + nodeitem:set_name("mcl_signs:standing_sign" .. _name) + elseif rotation_level % 4 == 1 then + nodeitem:set_name("mcl_signs:standing_sign22_5" .. _name) + elseif rotation_level % 4 == 2 then + nodeitem:set_name("mcl_signs:standing_sign45" .. _name) + elseif rotation_level % 4 == 3 then + nodeitem:set_name("mcl_signs:standing_sign67_5" .. _name) + end + fdir = math.floor(rotation_level / 4) + + -- Place the node! + local _, success = minetest.item_place_node(nodeitem, placer, pointed_thing, fdir) + if not success then + return itemstack + end + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item() + end + sign_info = mcl_signs.signtext_info_standing[rotation_level + 1] + -- Side + else + -- Wall sign + local _, success = minetest.item_place_node(itemstack, placer, pointed_thing, wdir) + if not success then + return itemstack + end + sign_info = mcl_signs.signtext_info_wall[fdir + 1] + end + + -- Determine spawn position of entity + local place_pos + if minetest.registered_nodes[node_under.name].buildable_to then + place_pos = under + else + place_pos = above + end + + if DEBUG then + minetest.log("action", "[mcl_signs] Register_Sign::Placed position:" .. dump(place_pos) .. "\nSign_info: " .. dump(sign_info)) + end + + local text_entity = minetest.add_entity({ + x = place_pos.x + sign_info.delta.x, + y = place_pos.y + sign_info.delta.y, + z = place_pos.z + sign_info.delta.z }, "mcl_signs:text") + text_entity:set_yaw(sign_info.yaw) + text_entity:get_luaentity()._signnodename = nodeitem:get_name() + + minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true) + + mcl_signs:show_formspec(placer, place_pos) + return itemstack + end + + minetest.override_item("mcl_signs:wall_sign" .. _name, new_sign) + update_sign_registry("wall", "mcl_signs:wall_sign" .. _name) + + -- debug step + if DEBUG then + minetest.log("action", "[mcl_signs] Registered: mcl_signs:wall_sign" .. _name .. color .. "\n" .. dump(new_sign)) + minetest.log("action", "[mcl_signs] mcl_signs:wall_sign_standard\n" .. dump(mcl_signs.wall_standard)) + end + + -- standing sign base. + local new_sign_standing = {} + new_sign_standing = table.copy(mcl_signs.standing_standard) + new_sign_standing.drop = "mcl_signs:wall_sign" .. _name + new_sign_standing.wield_image = "(default_sign.png^[multiply:" .. color .. ")" + new_sign_standing.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" } + new_sign_standing.inventory_image = "(default_sign.png^[multiply:" .. color .. ")" + minetest.override_item("mcl_signs:standing_sign" .. _name, new_sign_standing) + update_sign_registry("standing", "mcl_signs:standing_sign" .. _name) + -- debug step + if DEBUG then + minetest.log("action", "[mcl_signs] Registered: mcl_signs:standing_sign" .. _name .. color .. "\n" .. dump(new_sign_standing)) + end + + -- 22.5° + local ssign22_5d = table.copy(new_sign_standing) + ssign22_5d.mesh = "mcl_signs_sign22.5.obj" + ssign22_5d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign45" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.override_item("mcl_signs:standing_sign22_5" .. _name, ssign22_5d) + update_sign_registry("standing", "mcl_signs:standing_sign22_5" .. _name) + + -- 45° + local ssign45d = table.copy(new_sign_standing) + ssign45d.mesh = "mcl_signs_sign45.obj" + ssign45d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign67_5" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.override_item("mcl_signs:standing_sign45" .. _name, ssign45d) + update_sign_registry("standing", "mcl_signs:standing_sign45" .. _name) + + -- 67.5° + local ssign67_5d = table.copy(new_sign_standing) + ssign67_5d.mesh = "mcl_signs_sign67.5.obj" + ssign67_5d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign" .. _name + node.param2 = (node.param2 + 1) % 4 + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.override_item("mcl_signs:standing_sign67_5" .. _name, ssign67_5d) + update_sign_registry("standing", "mcl_signs:standing_sign67_5" .. _name) + + -- register Doc entry + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:wall_sign" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign22_5" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign45" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign67_5" .. _name) + end + + --register standing sign's rotation_levels + table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign22_5" .. _name , 1}) + table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign45" .. _name , 2}) + table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign67_5" .. _name , 3}) +end + +--- The same as reregister_sign, except caller defines the textures. Note, there is a greyscale version of the sign, +--- called "default_sign_greyscale.png" and "mcl_signs_sign_greyscale.png" for optional use in the textures directory. +--- +--- modname: optional (pass "" or "false" to ignore), for use with other mods to +--- allow the creation of a sign from the mod's wood (if installed). +--- +--- _name: the sign's name suffix, such as "_dark" or "_red", etc., appended to "wall_sign" or "standing_sign" +--- +--- tiles: the texture file to use for the sign. +--- +--- color: color the texture file to use with this color. Use white (#FFFFFF) to negate the color, +--- and just use the texture as is +--- +--- inventory_image: the texture file to use for the sign's display in inventory. +--- +--- wield_image: the texture file to use for the sign's weilded (in hand) object. +--- +--- inventory_image: the image used for in-inventory and in hand. +--- +--- ttsign: the tool tip of the sign that gets translated. Shown when the mouse hovers the inventory sign. +--- For example: the basic, default oak (wood) sign is just "Sign"; and a spruce sign would be "Spruce Sign" +function mcl_signs.reregister_sign_custom (modname, _name, tiles, color, inventory_image, wield_image, ttsign) + local mod_name_pass = false + if modname ~= "" and modname ~= "false" then + if minetest.get_modpath(modname) then + mod_name_pass = true + end + if mod_name_pass == false then + return + end + end + local new_sign = {} + + new_sign = table.copy(mcl_signs.wall_standard) + + new_sign.wield_image ="("..wield_image.."^[multiply:" .. color .. ")" + new_sign.tiles = { "("..tiles.."^[multiply:" .. color .. ")" } + new_sign.inventory_image = "("..inventory_image.."^[multiply:" .. color .. ")" + new_sign.description = S(ttsign) + -- currently have to do this, because of how the base node placement works. + new_sign.on_place = function(itemstack, placer, pointed_thing) + local above = pointed_thing.above + local under = pointed_thing.under + + -- Use pointed node's on_rightclick function first, if present + local node_under = minetest.get_node(under) + if placer and not placer:get_player_control().sneak then + if minetest.registered_nodes[node_under.name] and minetest.registered_nodes[node_under.name].on_rightclick then + return minetest.registered_nodes[node_under.name].on_rightclick(under, node_under, placer, itemstack) or itemstack + end + end + + local dir = vector.subtract(under, above) + + -- Only build when it's legal + local abovenodedef = minetest.registered_nodes[minetest.get_node(above).name] + if not abovenodedef or abovenodedef.buildable_to == false then + return itemstack + end + + local wdir = minetest.dir_to_wallmounted(dir) + local fdir = minetest.dir_to_facedir(dir) + + local sign_info + local nodeitem = ItemStack(itemstack) + -- Ceiling + if wdir == 0 then + --how would you add sign to ceiling? + return itemstack + -- Floor + elseif wdir == 1 then + -- Standing sign + + -- Determine the sign rotation based on player's yaw + local yaw = pi * 2 - placer:get_look_horizontal() + + -- Select one of 16 possible rotations (0-15) + local rotation_level = mcl_signs:round((yaw / (pi * 2)) * 16) + + if rotation_level > 15 then + rotation_level = 0 + elseif rotation_level < 0 then + rotation_level = 15 + end + + -- The actual rotation is a combination of predefined mesh and facedir (see node definition) + if rotation_level % 4 == 0 then + nodeitem:set_name("mcl_signs:standing_sign" .. _name) + elseif rotation_level % 4 == 1 then + nodeitem:set_name("mcl_signs:standing_sign22_5" .. _name) + elseif rotation_level % 4 == 2 then + nodeitem:set_name("mcl_signs:standing_sign45" .. _name) + elseif rotation_level % 4 == 3 then + nodeitem:set_name("mcl_signs:standing_sign67_5" .. _name) + end + fdir = math.floor(rotation_level / 4) + + -- Place the node! + local _, success = minetest.item_place_node(nodeitem, placer, pointed_thing, fdir) + if not success then + return itemstack + end + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item() + end + sign_info = mcl_signs.signtext_info_standing[rotation_level + 1] + -- Side + else + -- Wall sign + local _, success = minetest.item_place_node(itemstack, placer, pointed_thing, wdir) + if not success then + return itemstack + end + sign_info = mcl_signs.signtext_info_wall[fdir + 1] + end + + -- Determine spawn position of entity + local place_pos + if minetest.registered_nodes[node_under.name].buildable_to then + place_pos = under + else + place_pos = above + end + + local text_entity = minetest.add_entity({ + x = place_pos.x + sign_info.delta.x, + y = place_pos.y + sign_info.delta.y, + z = place_pos.z + sign_info.delta.z }, "mcl_signs:text") + text_entity:set_yaw(sign_info.yaw) + text_entity:get_luaentity()._signnodename = nodeitem:get_name() + + minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true) + + mcl_signs:show_formspec(placer, place_pos) + return itemstack + end + minetest.override_item("mcl_signs:wall_sign" .. _name, new_sign) + update_sign_registry("wall", "mcl_signs:wall_sign" .. _name) + + -- standing sign base. + local new_sign_standing = {} + new_sign_standing = table.copy(mcl_signs.standing_standard) + new_sign_standing.drop = "mcl_signs:wall_sign" .. _name + new_sign_standing.wield_image ="("..wield_image.."^[multiply:" .. color .. ")" + new_sign_standing.tiles = { "("..tiles.."^[multiply:" .. color .. ")" } + new_sign_standing.inventory_image = "("..inventory_image.."^[multiply:" .. color .. ")" + minetest.override_item("mcl_signs:standing_sign" .. _name, new_sign_standing) + update_sign_registry("standing", "mcl_signs:standing_sign" .. _name) + + -- 22.5° + local ssign22_5d = table.copy(new_sign_standing) + ssign22_5d.mesh = "mcl_signs_sign22.5.obj" + ssign22_5d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign45" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.override_item("mcl_signs:standing_sign22_5" .. _name, ssign22_5d) + update_sign_registry("standing", "mcl_signs:standing_sign22_5" .. _name) + + -- 45° + local ssign45d = table.copy(new_sign_standing) + ssign45d.mesh = "mcl_signs_sign45.obj" + ssign45d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign67_5" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.override_item("mcl_signs:standing_sign45" .. _name, ssign45d) + update_sign_registry("standing", "mcl_signs:standing_sign45" .. _name) + + -- 67.5° + local ssign67_5d = table.copy(new_sign_standing) + ssign67_5d.mesh = "mcl_signs_sign67.5.obj" + ssign67_5d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign" .. _name + node.param2 = (node.param2 + 1) % 4 + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.override_item("mcl_signs:standing_sign67_5" .. _name, ssign67_5d) + update_sign_registry("standing", "mcl_signs:standing_sign67_5" .. _name) + + -- register Doc entry + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:wall_sign" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign22_5" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign45" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign67_5" .. _name) + end + + --register standing sign's rotation_levels + table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign22_5" .. _name , 1}) + table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign45" .. _name , 2}) + table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign67_5" .. _name , 3}) + +end + +--- Usage: Call this with the mod's name, the wood's item string (for the planks), and with the sign's suffix. +--- Registers the crafting recipe for that sign. for every registered sign, call this function to register the +--- standard recipe for the sign. Otherwise, you have to do your own register craft call. +--- +--- modname: optional (pass "" or "false" to ignore), for use with other mods to +--- allow the creation of a sign from the mod's wood (if installed). Example: "mcl_core". +--- +--- wood_item_string: example: "mcl_core:wood" or "mcl_core:sprucewood" +--- +--- _name: the sign's name suffix, such as "_dark" or "_red", etc., appended to "wall_sign" or "standing_sign" +function mcl_signs.register_sign_craft(modname, wood_item_string, _name) + local mod_name_pass = false + if modname ~= "" and modname ~= "false" then + if minetest.get_modpath(modname) then + mod_name_pass = true + end + if mod_name_pass == false then + return + end + end + + minetest.register_craft({ + type = "fuel", + recipe = "mcl_signs:wall_sign" .. _name, + burntime = 10, + }) + + -- debug step + if DEBUG then + minetest.log("action", "[mcl_signs] Register Sign Crafts: \n" .. modname .. "\n" .. wood_item_string .. "\n" .. _name) + end + + -- register crafts (actual recipe) + if minetest.get_modpath(modname) then + + local itemstring = "mcl_signs:wall_sign" + + minetest.register_craft({ + output = itemstring .. _name .. " 3", + recipe = { + { wood_item_string, wood_item_string, wood_item_string }, + { wood_item_string, wood_item_string, wood_item_string }, + { "", "mcl_core:stick", "" }, + }, + }) + end + +end + +-- Helper functions +local function string_to_array(str) + local string_table = {} + for i = 1, string.len(str) do + table.insert(string_table, string.sub(str, i, i)) + end + return string_table +end + +local function string_to_line_array(str) + local linechar_table = {} + local current = 1 + local linechar = 1 + linechar_table[1] = "" + for _, char in ipairs(string_to_array(str)) do + -- New line + if char == "\n" then + current = current + 1 + linechar_table[current] = "" + linechar = 1 + else + linechar_table[current] = linechar_table[current] .. char + linechar = linechar + 1 + end + end + return linechar_table +end + +local function get_rotation_level(facedir, nodename) + local nnames = mcl_signs.standing_rotation_levels -- functional copy... was easier this way. #LazyAF :P + + local rl + local offset = 0 + for x = 1, #nnames do + if nnames[x][1] == nodename then + offset = nnames[x][2] + break + end + end + rl = facedir * 4 + offset + if DEBUG then + minetest.log("action", "[mcl_signs] GetRotationLevel: NodeName: " .. nodename .. " RL value: " .. rl) + end + return rl +end + +function mcl_signs:round(num, idp) + local mult = 10 ^ (idp or 0) + return math.floor(num * mult + 0.5) / mult +end + +function mcl_signs:get_color_for_sign(item_name) + + for d = 1, #Dyes_table do + if Dyes_table[d][1] == item_name then + return Dyes_table[d][2] + end + end + return "false" +end + +function mcl_signs:color_sign (pos, text_color) + + local success = mcl_signs:update_sign(pos, nil, nil, true, text_color) + + -- debug step + local meta = minetest.get_meta(pos) + if not meta then + minetest.log("error", "[mcl_signs] Sign Color Fail - Metadata.") + + return false + end + if DEBUG then + minetest.log("verbose", "[mcl_signs] Post-Sign Color: " .. meta:get_string("mcl_signs:text_color") .. " " .. meta:get_string("mcl_signs:glowing_sign") .. ".\n" .. dump(pos)) + end + + return success + +end + +function mcl_signs:glow_sign (pos, remove_glow) + local success = true + -- Get Meta Data for the sign. + local meta = minetest.get_meta(pos) + + if not meta then + return false + end + local text = meta:get_string("text") + if text == nil then + text = "" + end + + -- we can't make the text glow if there isn't any text + if text == "" then + return false + end + + if remove_glow == nil then + remove_glow = false + end + + -- set up text glow + local objects = minetest.get_objects_inside_radius(pos, 0.5) + local text_entity + for _, v in ipairs(objects) do + local ent = v:get_luaentity() + if ent and ent.name == "mcl_signs:text" then + text_entity = v + break + end + end + if remove_glow == true then + text_entity:set_properties({ + glow = nil, + }) + meta:set_string("mcl_signs:glowing_sign", "false") + else + text_entity:set_properties({ + glow = sign_glow, + }) + meta:set_string("mcl_signs:glowing_sign", "true") + end + if not text_entity then + return false + end + text_entity:get_luaentity()._glowing_sign = meta:get_string("mcl_signs:glowing_sign") + + -- debug step + if DEBUG then + minetest.log("verbose", "[mcl_signs] Post-Sign Glow: " .. meta:get_string("mcl_signs:text_color") .. " " .. meta:get_string("mcl_signs:glowing_sign") .. ".\n" .. dump(pos)) + end + return success +end + +function mcl_signs:create_lettering(text, signnodename, sign_color) + if sign_color == nil then + sign_color = mcl_colors.BLACK + end + local texture = mcl_signs:generate_texture(mcl_signs:create_lines(text), signnodename, sign_color) + + -- debug step + if DEBUG then + minetest.log("action", "[mcl_signs] Creating sign text; text:" .. text) + end + + return texture +end + +function mcl_signs:create_lines(text) + local line_num = 1 + local text_table = {} + for _, line in ipairs(string_to_line_array(text)) do + if line_num > NUMBER_OF_LINES then + break + end + table.insert(text_table, line) + line_num = line_num + 1 + end + return text_table +end + +function mcl_signs:generate_line(s, ypos) + local i = 1 + local parsed = {} + local width = 0 + local chars = 0 + local printed_char_width = CHAR_WIDTH + 1 + while chars < LINE_LENGTH and i <= #s do + local file + -- Get and render character + if charmap[s:sub(i, i)] then + file = charmap[s:sub(i, i)] + i = i + 1 + elseif i < #s and charmap[s:sub(i, i + 1)] then + file = charmap[s:sub(i, i + 1)] + i = i + 2 + else + -- No character image found. + -- Use replacement character: + file = "_rc" + i = i + 1 + if DEBUG then + minetest.log("verbose", "[mcl_signs] Unknown symbol in '" .. s .. "' at " .. i) + end + end + if file then + width = width + printed_char_width + table.insert(parsed, file) + chars = chars + 1 + end + end + width = width - 1 + + local texture = "" + local xpos = math.floor((SIGN_WIDTH - width) / 2) + + for j = 1, #parsed do + texture = texture .. ":" .. xpos .. "," .. ypos .. "=" .. parsed[j] .. ".png" + xpos = xpos + printed_char_width + end + return texture +end + +function mcl_signs:generate_texture(lines, signnodename, letter_color) + local texture = "[combine:" .. SIGN_WIDTH .. "x" .. SIGN_WIDTH + local ypos = 0 + + -- Handle all of the dynamically created signs. + for x = 1, #mcl_signs.registered_signs.wall_signs do + if signnodename == mcl_signs.registered_signs.wall_signs[x] then + ypos = 30 + break + end + end + for x = 1, #mcl_signs.registered_signs.standing_signs do + if signnodename == mcl_signs.registered_signs.standing_signs[x] then + ypos = 0 + break + end + end + -- for future inclusion, when the hanging sings are made. + --[[ + for x = 1, #mcl_signs.registered_signs.hanging_signs do + if signnodename == mcl_signs.registered_signs.hanging_signs[x] then + ypos = 30 + break + end + end + ]] + + -- kept in for now, compatibility with existing hard coded signs. TODO: Remove after done with api. + if signnodename == "mcl_signs:wall_sign" or signnodename == "mcl_signs:wall_sign_dark" then + ypos = 30 + end + + -- debug step + if DEBUG then + minetest.log("action", "[mcl_signs] Generate_Texture::Debug_Data:\nSignNodeName: " .. dump(signnodename) .. "\nYPOS: " .. ypos) + end + + for i = 1, #lines do + texture = texture .. mcl_signs:generate_line(lines[i], ypos) + ypos = ypos + LINE_HEIGHT + end + + texture = "(" .. texture .. "^[multiply:" .. letter_color .. ")" + return texture +end + +function mcl_signs:get_wall_signtext_info(param2, nodename) + local dir = minetest.wallmounted_to_dir(param2) + if dir.x > 0 then + return 2 + elseif dir.z > 0 then + return 1 + elseif dir.x < 0 then + return 4 + else + return 3 + end +end + +function mcl_signs:destruct_sign(pos) + local objects = minetest.get_objects_inside_radius(pos, 0.5) + for _, v in ipairs(objects) do + local ent = v:get_luaentity() + if ent and ent.name == "mcl_signs:text" then + v:remove() + end + end + local players = minetest.get_connected_players() + for p = 1, #players do + if vector.distance(players[p]:get_pos(), pos) <= 30 then + minetest.close_formspec(players[p]:get_player_name(), "mcl_signs:set_text_" .. pos.x .. "_" .. pos.y .. "_" .. pos.z) + end + end +end + +function mcl_signs:update_sign(pos, fields, sender, force_remove, text_color) + -- Get Meta Data for the sign. + local meta = minetest.get_meta(pos) + + if not meta then + return false + end + local text = meta:get_string("text") + if fields and (text == "" and fields.text) then + meta:set_string("text", fields.text) + text = fields.text + end + if text == nil then + text = "" + end + + -- find text color. + local sign_color + + if meta:get_string("mcl_signs:text_color") == "" then + -- if no sign text color has been assigned, make it black. + sign_color = mcl_colors.BLACK + meta:set_string("mcl_signs:text_color", sign_color) + else + sign_color = meta:get_string("mcl_signs:text_color") + end + + if text_color == nil or text == "" then + text_color = "false" + end + + if text_color == "false" then + text_color = sign_color --if a new color hasn't been chosen, then keep the existing color. + end + + -- find the sign's glow value + local has_glow = false + + if meta:get_string("mcl_signs:glowing_sign") == "" or meta:get_string("mcl_signs:glowing_sign") == "false" then + has_glow = false + meta:set_string("mcl_signs:glowing_sign", "false") + else + has_glow = true + end + + -- debug step + if DEBUG then + minetest.log("action", "[mcl_signs] Update_Signs: Pre-Sign Update: " .. sign_color .. " " .. meta:get_string("mcl_signs:glowing_sign") .. ".\n" .. dump(pos)) + end + + local sign_info + local npos = minetest.get_node(pos) + local npos_name = npos.name + + -- Handle all of the dynamically created signs. + for x = 1, #mcl_signs.registered_signs.wall_signs do + if npos_name == mcl_signs.registered_signs.wall_signs[x] then + sign_info = mcl_signs.signtext_info_wall[mcl_signs:get_wall_signtext_info(npos.param2)] + break + end + end + for x = 1, #mcl_signs.registered_signs.standing_signs do + if npos_name == mcl_signs.registered_signs.standing_signs[x] then + sign_info = mcl_signs.signtext_info_standing[get_rotation_level(npos.param2, npos_name) + 1] + break + end + end + -- for future inclusion, when the hanging sings are made. + --[[ + for x = 1, #mcl_signs.registered_signs.hanging_signs do + if nn == mcl_signs.registered_signs.hanging_signs[x] then + sign_info = mcl_signs.signtext_info_wall[mcl_signs:get_wall_signtext_info(n.param2)] + break + end + end + ]] + + -- the following if..elseif..end block is here for compatibility with the old code. TODO: remove this block after the new api is complete. + if npos_name == "mcl_signs:standing_sign_dark" or npos_name == "mcl_signs:standing_sign22_5_dark" or npos_name == "mcl_signs:standing_sign45_dark" or npos_name == "mcl_signs:standing_sign67_5_dark" then + sign_info = mcl_signs.signtext_info_standing[get_rotation_level(npos.param2, npos_name) + 1] + elseif npos_name == "mcl_signs:wall_sign_dark" then + sign_info = mcl_signs.signtext_info_wall[mcl_signs:get_wall_signtext_info(npos.param2)] + end + if sign_info == nil then + minetest.log("error", "[mcl_signs] Update_Signs: Missing sign_info!") + return false + end + + local objects = minetest.get_objects_inside_radius(pos, 0.5) + local text_entity + for _, v in ipairs(objects) do + local ent = v:get_luaentity() + if ent and ent.name == "mcl_signs:text" then + if force_remove then + v:remove() + else + text_entity = v + break + end + end + end + + if not text_entity then + if DEBUG then + minetest.log("action", "[mcl_signs] Update_Sign: Text_Entity - does not exist, creating it now.") + end + text_entity = minetest.add_entity({ + x = pos.x + sign_info.delta.x, + y = pos.y + sign_info.delta.y, + z = pos.z + sign_info.delta.z }, "mcl_signs:text") + + if DEBUG then + minetest.log("action", "[mcl_signs] Update_Sign: Placed position:" .. dump(pos) .. "\nSign_info: " .. dump(sign_info)) + end + end + text_entity:get_luaentity()._signnodename = npos_name + + -- set up special case: Dark Oak Sign. Dark Oak signs are soooo dark, they start off with white lettering. + if npos_name == "mcl_signs:wall_sign_darkwood" or + npos_name == "mcl_signs:standing_sign67_5_darkwood" or + npos_name == "mcl_signs:standing_sign45_darkwood" or + npos_name == "mcl_signs:standing_sign22_5_darkwood" or + npos_name == "mcl_signs:standing_sign_darkwood" + then + if text_color == "#000000" then + text_color = "#ffffff" + end + end + + -- Set the actual properties for the sign + + text_entity:set_properties({ + textures = { mcl_signs:create_lettering(text, npos_name, text_color) }, + }) + + if has_glow then + text_entity:set_properties({ + glow = sign_glow, + }) + end + + text_entity:set_yaw(sign_info.yaw) + if DEBUG then + minetest.log("verbose", "[mcl_signs] Update_Sign: After texture recreation.") + minetest.log("action","[mcl_signs] Update_Sign: " .. npos_name .. "\nPlaced position:" .. dump(pos) .. "\nSign_info: " .. dump(sign_info)) + end + + -- save sign metadata. + meta:set_string("mcl_signs:text_color", text_color) + -- debug step + if DEBUG then + minetest.log("action", "[mcl_signs] Update_Sign: Post-Sign Update: " .. meta:get_string("mcl_signs:text_color") .. " " .. meta:get_string("mcl_signs:glowing_sign") .. ".\n" .. dump(pos)) + end + + return true + +end + +function mcl_signs:show_formspec(player, pos) + minetest.show_formspec( + player:get_player_name(), + "mcl_signs:set_text_" .. pos.x .. "_" .. pos.y .. "_" .. pos.z, + "size[6,3]textarea[0.25,0.25;6,1.5;text;" .. F(S("Enter sign text:")) .. ";]label[0,1.5;" .. F(S("Maximum line length: 15")) .. "\n" .. F(S("Maximum lines: 4")) .. "]button_exit[0,2.5;6,1;submit;" .. F(S("Done")) .. "]" + ) +end diff --git a/mods/ITEMS/mcl_signs/textures/_0.png b/mods/ITEMS/mcl_signs/textures/_0.png index e764f3d6a..7ec1aea7a 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_0.png and b/mods/ITEMS/mcl_signs/textures/_0.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_1.png b/mods/ITEMS/mcl_signs/textures/_1.png index 7fae5fa4c..e4bf5c3ac 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_1.png and b/mods/ITEMS/mcl_signs/textures/_1.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_1_2.png b/mods/ITEMS/mcl_signs/textures/_1_2.png index 52d025e87..8bdc3f8cc 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_1_2.png and b/mods/ITEMS/mcl_signs/textures/_1_2.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_1_4.png b/mods/ITEMS/mcl_signs/textures/_1_4.png index 220e65ef5..d32aa3027 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_1_4.png and b/mods/ITEMS/mcl_signs/textures/_1_4.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_1_sup.png b/mods/ITEMS/mcl_signs/textures/_1_sup.png index 6be5fdcb1..0e20bf3a6 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_1_sup.png and b/mods/ITEMS/mcl_signs/textures/_1_sup.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_2.png b/mods/ITEMS/mcl_signs/textures/_2.png index e32866d03..29583723f 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_2.png and b/mods/ITEMS/mcl_signs/textures/_2.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_2_sup.png b/mods/ITEMS/mcl_signs/textures/_2_sup.png index 3db952179..ddc378772 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_2_sup.png and b/mods/ITEMS/mcl_signs/textures/_2_sup.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_3.png b/mods/ITEMS/mcl_signs/textures/_3.png index 4e7da5665..c58caaa8c 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_3.png and b/mods/ITEMS/mcl_signs/textures/_3.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_3_4.png b/mods/ITEMS/mcl_signs/textures/_3_4.png index 46e171049..316909108 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_3_4.png and b/mods/ITEMS/mcl_signs/textures/_3_4.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_3_sup.png b/mods/ITEMS/mcl_signs/textures/_3_sup.png index add337326..eae28867d 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_3_sup.png and b/mods/ITEMS/mcl_signs/textures/_3_sup.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_4.png b/mods/ITEMS/mcl_signs/textures/_4.png index 5f3d95656..38048937c 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_4.png and b/mods/ITEMS/mcl_signs/textures/_4.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_5.png b/mods/ITEMS/mcl_signs/textures/_5.png index baf23b273..96da18b50 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_5.png and b/mods/ITEMS/mcl_signs/textures/_5.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_6.png b/mods/ITEMS/mcl_signs/textures/_6.png index 31fcd7d72..e34e190e1 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_6.png and b/mods/ITEMS/mcl_signs/textures/_6.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_7.png b/mods/ITEMS/mcl_signs/textures/_7.png index 7594eb9d6..2b078c134 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_7.png and b/mods/ITEMS/mcl_signs/textures/_7.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_8.png b/mods/ITEMS/mcl_signs/textures/_8.png index b61f4e294..d4580e83f 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_8.png and b/mods/ITEMS/mcl_signs/textures/_8.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_9.png b/mods/ITEMS/mcl_signs/textures/_9.png index 5ed82070b..3077c7bb3 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_9.png and b/mods/ITEMS/mcl_signs/textures/_9.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a.png b/mods/ITEMS/mcl_signs/textures/_a.png index 4b9356ac4..d57502ddb 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_a.png and b/mods/ITEMS/mcl_signs/textures/_a.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_.png b/mods/ITEMS/mcl_signs/textures/_a_.png index 152beabd4..157565774 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_a_.png and b/mods/ITEMS/mcl_signs/textures/_a_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_acute.png b/mods/ITEMS/mcl_signs/textures/_a_acute.png index b72b4853e..552988e31 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_a_acute.png and b/mods/ITEMS/mcl_signs/textures/_a_acute.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_acute_.png b/mods/ITEMS/mcl_signs/textures/_a_acute_.png index d038b45ce..2f8736226 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_a_acute_.png and b/mods/ITEMS/mcl_signs/textures/_a_acute_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_circumflex.png b/mods/ITEMS/mcl_signs/textures/_a_circumflex.png index f9b80df66..224675375 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_a_circumflex.png and b/mods/ITEMS/mcl_signs/textures/_a_circumflex.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_circumflex_.png b/mods/ITEMS/mcl_signs/textures/_a_circumflex_.png index 8b35bdf7c..146671315 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_a_circumflex_.png and b/mods/ITEMS/mcl_signs/textures/_a_circumflex_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_grave.png b/mods/ITEMS/mcl_signs/textures/_a_grave.png index 3f0de45a5..6ccb2088e 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_a_grave.png and b/mods/ITEMS/mcl_signs/textures/_a_grave.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_grave_.png b/mods/ITEMS/mcl_signs/textures/_a_grave_.png index 8176f51c5..f973dec5d 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_a_grave_.png and b/mods/ITEMS/mcl_signs/textures/_a_grave_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_ring.png b/mods/ITEMS/mcl_signs/textures/_a_ring.png index d3c06ae6d..4d1b1e896 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_a_ring.png and b/mods/ITEMS/mcl_signs/textures/_a_ring.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_ring_.png b/mods/ITEMS/mcl_signs/textures/_a_ring_.png index d3e9b7e96..0c28aadcc 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_a_ring_.png and b/mods/ITEMS/mcl_signs/textures/_a_ring_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_sup.png b/mods/ITEMS/mcl_signs/textures/_a_sup.png index 4f4f9801c..c2a001016 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_a_sup.png and b/mods/ITEMS/mcl_signs/textures/_a_sup.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_tilde.png b/mods/ITEMS/mcl_signs/textures/_a_tilde.png index 567632c37..0600d53ad 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_a_tilde.png and b/mods/ITEMS/mcl_signs/textures/_a_tilde.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_a_tilde_.png b/mods/ITEMS/mcl_signs/textures/_a_tilde_.png index fd3d97784..baffca08e 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_a_tilde_.png and b/mods/ITEMS/mcl_signs/textures/_a_tilde_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_acute.png b/mods/ITEMS/mcl_signs/textures/_acute.png index 0655de2dd..709cf70fb 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_acute.png and b/mods/ITEMS/mcl_signs/textures/_acute.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ae.png b/mods/ITEMS/mcl_signs/textures/_ae.png index 7f199e477..40bf3cd6b 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_ae.png and b/mods/ITEMS/mcl_signs/textures/_ae.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ae_.png b/mods/ITEMS/mcl_signs/textures/_ae_.png index e19fdf1c8..2f6a56d00 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_ae_.png and b/mods/ITEMS/mcl_signs/textures/_ae_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ae_lig.png b/mods/ITEMS/mcl_signs/textures/_ae_lig.png index a02bd30cf..0f721d8e0 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_ae_lig.png and b/mods/ITEMS/mcl_signs/textures/_ae_lig.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ae_lig_.png b/mods/ITEMS/mcl_signs/textures/_ae_lig_.png index 0eb5d2f5c..8aba2a4bc 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_ae_lig_.png and b/mods/ITEMS/mcl_signs/textures/_ae_lig_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_am.png b/mods/ITEMS/mcl_signs/textures/_am.png index 76a886757..15ad80d73 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_am.png and b/mods/ITEMS/mcl_signs/textures/_am.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ap.png b/mods/ITEMS/mcl_signs/textures/_ap.png index bced380ac..e44b77a61 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_ap.png and b/mods/ITEMS/mcl_signs/textures/_ap.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_as.png b/mods/ITEMS/mcl_signs/textures/_as.png index 702a519b8..fbf1494d4 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_as.png and b/mods/ITEMS/mcl_signs/textures/_as.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_at.png b/mods/ITEMS/mcl_signs/textures/_at.png index 1c7fa502c..b6b1ebe31 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_at.png and b/mods/ITEMS/mcl_signs/textures/_at.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_b.png b/mods/ITEMS/mcl_signs/textures/_b.png index 427f488e5..bb44b3c1a 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_b.png and b/mods/ITEMS/mcl_signs/textures/_b.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_b_.png b/mods/ITEMS/mcl_signs/textures/_b_.png index c89961d1b..034f595ce 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_b_.png and b/mods/ITEMS/mcl_signs/textures/_b_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_bl.png b/mods/ITEMS/mcl_signs/textures/_bl.png index 422fcc586..a8e73c1b7 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_bl.png and b/mods/ITEMS/mcl_signs/textures/_bl.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_br.png b/mods/ITEMS/mcl_signs/textures/_br.png index 88b1ba4a3..aebe3a025 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_br.png and b/mods/ITEMS/mcl_signs/textures/_br.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_broken_bar.png b/mods/ITEMS/mcl_signs/textures/_broken_bar.png index c733fd862..a2ec6ccc8 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_broken_bar.png and b/mods/ITEMS/mcl_signs/textures/_broken_bar.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_c.png b/mods/ITEMS/mcl_signs/textures/_c.png index 0ae311f3d..9d61a1c47 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_c.png and b/mods/ITEMS/mcl_signs/textures/_c.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_c_.png b/mods/ITEMS/mcl_signs/textures/_c_.png index 135260913..bd6d69d71 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_c_.png and b/mods/ITEMS/mcl_signs/textures/_c_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_c_cedille.png b/mods/ITEMS/mcl_signs/textures/_c_cedille.png index 9d5a4b564..a59faa4fb 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_c_cedille.png and b/mods/ITEMS/mcl_signs/textures/_c_cedille.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_c_cedille_.png b/mods/ITEMS/mcl_signs/textures/_c_cedille_.png index 7eb654bc4..3dcffc8e4 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_c_cedille_.png and b/mods/ITEMS/mcl_signs/textures/_c_cedille_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ca.png b/mods/ITEMS/mcl_signs/textures/_ca.png index 79fa4345f..799333fcc 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_ca.png and b/mods/ITEMS/mcl_signs/textures/_ca.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_cedille.png b/mods/ITEMS/mcl_signs/textures/_cedille.png index 0de32ed0c..2fd6e557f 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_cedille.png and b/mods/ITEMS/mcl_signs/textures/_cedille.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_cent.png b/mods/ITEMS/mcl_signs/textures/_cent.png index ecdb1f1d1..ac2265b05 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_cent.png and b/mods/ITEMS/mcl_signs/textures/_cent.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_cl.png b/mods/ITEMS/mcl_signs/textures/_cl.png index 38cad796c..71a046245 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_cl.png and b/mods/ITEMS/mcl_signs/textures/_cl.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_cm.png b/mods/ITEMS/mcl_signs/textures/_cm.png index 6b2b10a17..6a6a8bc5a 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_cm.png and b/mods/ITEMS/mcl_signs/textures/_cm.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_co.png b/mods/ITEMS/mcl_signs/textures/_co.png index 6775d5eaf..73808a7d9 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_co.png and b/mods/ITEMS/mcl_signs/textures/_co.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_copyright.png b/mods/ITEMS/mcl_signs/textures/_copyright.png index 7cfdf217e..1f0e3c934 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_copyright.png and b/mods/ITEMS/mcl_signs/textures/_copyright.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_cr.png b/mods/ITEMS/mcl_signs/textures/_cr.png index cd6d6dac6..2fbbf790f 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_cr.png and b/mods/ITEMS/mcl_signs/textures/_cr.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_currency.png b/mods/ITEMS/mcl_signs/textures/_currency.png index 1264c8945..45806c12b 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_currency.png and b/mods/ITEMS/mcl_signs/textures/_currency.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_d.png b/mods/ITEMS/mcl_signs/textures/_d.png index d7988e2be..f7bd840cb 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_d.png and b/mods/ITEMS/mcl_signs/textures/_d.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_d_.png b/mods/ITEMS/mcl_signs/textures/_d_.png index 8803ea036..da46423c9 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_d_.png and b/mods/ITEMS/mcl_signs/textures/_d_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_d_dash.png b/mods/ITEMS/mcl_signs/textures/_d_dash.png index 73f5a1246..3f9b1e460 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_d_dash.png and b/mods/ITEMS/mcl_signs/textures/_d_dash.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_d_dash_.png b/mods/ITEMS/mcl_signs/textures/_d_dash_.png index e9c9e69c7..57e424f37 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_d_dash_.png and b/mods/ITEMS/mcl_signs/textures/_d_dash_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_degree.png b/mods/ITEMS/mcl_signs/textures/_degree.png index 64a7ee2b1..95b6c0800 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_degree.png and b/mods/ITEMS/mcl_signs/textures/_degree.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_diaresis.png b/mods/ITEMS/mcl_signs/textures/_diaresis.png index f8b75d38d..edbe9649c 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_diaresis.png and b/mods/ITEMS/mcl_signs/textures/_diaresis.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_div.png b/mods/ITEMS/mcl_signs/textures/_div.png index 808343753..ab6888146 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_div.png and b/mods/ITEMS/mcl_signs/textures/_div.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_dl.png b/mods/ITEMS/mcl_signs/textures/_dl.png index 044e4f00b..c1706295a 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_dl.png and b/mods/ITEMS/mcl_signs/textures/_dl.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_dt.png b/mods/ITEMS/mcl_signs/textures/_dt.png index 5dfa75349..b9a53650d 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_dt.png and b/mods/ITEMS/mcl_signs/textures/_dt.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_dv.png b/mods/ITEMS/mcl_signs/textures/_dv.png index 2989d93db..86d22fea4 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_dv.png and b/mods/ITEMS/mcl_signs/textures/_dv.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_e.png b/mods/ITEMS/mcl_signs/textures/_e.png index 316e966a1..431e2141b 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_e.png and b/mods/ITEMS/mcl_signs/textures/_e.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_e_.png b/mods/ITEMS/mcl_signs/textures/_e_.png index 5ef88d282..f9b674b15 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_e_.png and b/mods/ITEMS/mcl_signs/textures/_e_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_e_acute.png b/mods/ITEMS/mcl_signs/textures/_e_acute.png index 911207f86..4566f2dbc 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_e_acute.png and b/mods/ITEMS/mcl_signs/textures/_e_acute.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_e_acute_.png b/mods/ITEMS/mcl_signs/textures/_e_acute_.png index b60193740..70502e82f 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_e_acute_.png and b/mods/ITEMS/mcl_signs/textures/_e_acute_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_e_circumflex.png b/mods/ITEMS/mcl_signs/textures/_e_circumflex.png index 2b5ace3c4..0aca71f43 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_e_circumflex.png and b/mods/ITEMS/mcl_signs/textures/_e_circumflex.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_e_circumflex_.png b/mods/ITEMS/mcl_signs/textures/_e_circumflex_.png index c17d9dc29..02148554a 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_e_circumflex_.png and b/mods/ITEMS/mcl_signs/textures/_e_circumflex_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_e_grave.png b/mods/ITEMS/mcl_signs/textures/_e_grave.png index c24ab4635..c9366cd83 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_e_grave.png and b/mods/ITEMS/mcl_signs/textures/_e_grave.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_e_grave_.png b/mods/ITEMS/mcl_signs/textures/_e_grave_.png index c71bb2ef6..1006e5fea 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_e_grave_.png and b/mods/ITEMS/mcl_signs/textures/_e_grave_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ee.png b/mods/ITEMS/mcl_signs/textures/_ee.png index 646c19e14..4871c31be 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_ee.png and b/mods/ITEMS/mcl_signs/textures/_ee.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ee_.png b/mods/ITEMS/mcl_signs/textures/_ee_.png index 5db7bc66a..3e174052f 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_ee_.png and b/mods/ITEMS/mcl_signs/textures/_ee_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_eq.png b/mods/ITEMS/mcl_signs/textures/_eq.png index 166f7a30d..9135af0fe 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_eq.png and b/mods/ITEMS/mcl_signs/textures/_eq.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ex.png b/mods/ITEMS/mcl_signs/textures/_ex.png index 65a76aad1..e63ed21f2 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_ex.png and b/mods/ITEMS/mcl_signs/textures/_ex.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ex_inv.png b/mods/ITEMS/mcl_signs/textures/_ex_inv.png index 1e7bbfe87..af591188c 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_ex_inv.png and b/mods/ITEMS/mcl_signs/textures/_ex_inv.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_f.png b/mods/ITEMS/mcl_signs/textures/_f.png index 1e431df13..40318ea05 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_f.png and b/mods/ITEMS/mcl_signs/textures/_f.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_f_.png b/mods/ITEMS/mcl_signs/textures/_f_.png index d0dec2b35..9c234f7c0 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_f_.png and b/mods/ITEMS/mcl_signs/textures/_f_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_g.png b/mods/ITEMS/mcl_signs/textures/_g.png index 0b39fc95e..7ddd6e106 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_g.png and b/mods/ITEMS/mcl_signs/textures/_g.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_g_.png b/mods/ITEMS/mcl_signs/textures/_g_.png index bfe054638..881d06842 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_g_.png and b/mods/ITEMS/mcl_signs/textures/_g_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_gr.png b/mods/ITEMS/mcl_signs/textures/_gr.png index 3f806499a..92832f94e 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_gr.png and b/mods/ITEMS/mcl_signs/textures/_gr.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_gt.png b/mods/ITEMS/mcl_signs/textures/_gt.png index 0449b44de..a4ff1b616 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_gt.png and b/mods/ITEMS/mcl_signs/textures/_gt.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_guill_left.png b/mods/ITEMS/mcl_signs/textures/_guill_left.png index 32b90c3e2..a9cf7c724 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_guill_left.png and b/mods/ITEMS/mcl_signs/textures/_guill_left.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_guill_right.png b/mods/ITEMS/mcl_signs/textures/_guill_right.png index d372e6a85..f4433eca4 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_guill_right.png and b/mods/ITEMS/mcl_signs/textures/_guill_right.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_h.png b/mods/ITEMS/mcl_signs/textures/_h.png index bd6f1891c..b4c9cf2cb 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_h.png and b/mods/ITEMS/mcl_signs/textures/_h.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_h_.png b/mods/ITEMS/mcl_signs/textures/_h_.png index 08cb5d8b0..cdea24645 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_h_.png and b/mods/ITEMS/mcl_signs/textures/_h_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ha.png b/mods/ITEMS/mcl_signs/textures/_ha.png index 946ae4e5e..48323a28f 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_ha.png and b/mods/ITEMS/mcl_signs/textures/_ha.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_hs.png b/mods/ITEMS/mcl_signs/textures/_hs.png index 682a92a2d..60bce8e35 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_hs.png and b/mods/ITEMS/mcl_signs/textures/_hs.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_i.png b/mods/ITEMS/mcl_signs/textures/_i.png index 9ba3e01a3..4abe22825 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_i.png and b/mods/ITEMS/mcl_signs/textures/_i.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_i_.png b/mods/ITEMS/mcl_signs/textures/_i_.png index ffe090aa8..e8e5e1b58 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_i_.png and b/mods/ITEMS/mcl_signs/textures/_i_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_i_acute.png b/mods/ITEMS/mcl_signs/textures/_i_acute.png index 20bdafb62..b1ceff343 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_i_acute.png and b/mods/ITEMS/mcl_signs/textures/_i_acute.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_i_acute_.png b/mods/ITEMS/mcl_signs/textures/_i_acute_.png index 4cdc943d9..d59d86398 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_i_acute_.png and b/mods/ITEMS/mcl_signs/textures/_i_acute_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_i_circumflex.png b/mods/ITEMS/mcl_signs/textures/_i_circumflex.png index f0e712725..e7d5ab191 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_i_circumflex.png and b/mods/ITEMS/mcl_signs/textures/_i_circumflex.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_i_circumflex_.png b/mods/ITEMS/mcl_signs/textures/_i_circumflex_.png index dc46f3ff5..a15c15336 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_i_circumflex_.png and b/mods/ITEMS/mcl_signs/textures/_i_circumflex_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_i_grave.png b/mods/ITEMS/mcl_signs/textures/_i_grave.png index 7254cd7d2..c0ae05825 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_i_grave.png and b/mods/ITEMS/mcl_signs/textures/_i_grave.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_i_grave_.png b/mods/ITEMS/mcl_signs/textures/_i_grave_.png index 1e2212679..7c68cb968 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_i_grave_.png and b/mods/ITEMS/mcl_signs/textures/_i_grave_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_j.png b/mods/ITEMS/mcl_signs/textures/_j.png index 7fec50215..118928bfc 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_j.png and b/mods/ITEMS/mcl_signs/textures/_j.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_j_.png b/mods/ITEMS/mcl_signs/textures/_j_.png index 440af26d5..3983cec05 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_j_.png and b/mods/ITEMS/mcl_signs/textures/_j_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_k.png b/mods/ITEMS/mcl_signs/textures/_k.png index af07f4bf3..987d0e26a 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_k.png and b/mods/ITEMS/mcl_signs/textures/_k.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_k_.png b/mods/ITEMS/mcl_signs/textures/_k_.png index 5e0a6b995..183c1d27c 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_k_.png and b/mods/ITEMS/mcl_signs/textures/_k_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_l.png b/mods/ITEMS/mcl_signs/textures/_l.png index d28a863f3..f70432b50 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_l.png and b/mods/ITEMS/mcl_signs/textures/_l.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_l_.png b/mods/ITEMS/mcl_signs/textures/_l_.png index c40390194..89a5e1562 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_l_.png and b/mods/ITEMS/mcl_signs/textures/_l_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_lt.png b/mods/ITEMS/mcl_signs/textures/_lt.png index 54295121e..a1b9d2ff8 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_lt.png and b/mods/ITEMS/mcl_signs/textures/_lt.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_m.png b/mods/ITEMS/mcl_signs/textures/_m.png index e4110bbb0..9c9c691d8 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_m.png and b/mods/ITEMS/mcl_signs/textures/_m.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_m_.png b/mods/ITEMS/mcl_signs/textures/_m_.png index ac516a053..c7e9fa044 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_m_.png and b/mods/ITEMS/mcl_signs/textures/_m_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_macron.png b/mods/ITEMS/mcl_signs/textures/_macron.png index ffb9dfd77..738a4374e 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_macron.png and b/mods/ITEMS/mcl_signs/textures/_macron.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_mn.png b/mods/ITEMS/mcl_signs/textures/_mn.png index 2230e1065..63a9e67ba 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_mn.png and b/mods/ITEMS/mcl_signs/textures/_mn.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_mu.png b/mods/ITEMS/mcl_signs/textures/_mu.png index 3d8c1b890..483936af8 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_mu.png and b/mods/ITEMS/mcl_signs/textures/_mu.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_n.png b/mods/ITEMS/mcl_signs/textures/_n.png index ca5ea2787..3f16f50bc 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_n.png and b/mods/ITEMS/mcl_signs/textures/_n.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_n_.png b/mods/ITEMS/mcl_signs/textures/_n_.png index b96f27c62..430227892 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_n_.png and b/mods/ITEMS/mcl_signs/textures/_n_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_n_tilde.png b/mods/ITEMS/mcl_signs/textures/_n_tilde.png index 471669116..cfc1c626c 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_n_tilde.png and b/mods/ITEMS/mcl_signs/textures/_n_tilde.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_n_tilde_.png b/mods/ITEMS/mcl_signs/textures/_n_tilde_.png index 0dba0d471..404221056 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_n_tilde_.png and b/mods/ITEMS/mcl_signs/textures/_n_tilde_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_not.png b/mods/ITEMS/mcl_signs/textures/_not.png index a98f885e9..e7b1b7b66 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_not.png and b/mods/ITEMS/mcl_signs/textures/_not.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o.png b/mods/ITEMS/mcl_signs/textures/_o.png index 2a579385d..a59eacb8f 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_o.png and b/mods/ITEMS/mcl_signs/textures/_o.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_.png b/mods/ITEMS/mcl_signs/textures/_o_.png index 44ac3cbca..967c240b2 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_o_.png and b/mods/ITEMS/mcl_signs/textures/_o_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_acute.png b/mods/ITEMS/mcl_signs/textures/_o_acute.png index cda99b3a6..9094a80c7 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_o_acute.png and b/mods/ITEMS/mcl_signs/textures/_o_acute.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_acute_.png b/mods/ITEMS/mcl_signs/textures/_o_acute_.png index e25a3a7f4..9279670fa 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_o_acute_.png and b/mods/ITEMS/mcl_signs/textures/_o_acute_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_circumflex.png b/mods/ITEMS/mcl_signs/textures/_o_circumflex.png index 2f7a188df..1240f1718 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_o_circumflex.png and b/mods/ITEMS/mcl_signs/textures/_o_circumflex.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_circumflex_.png b/mods/ITEMS/mcl_signs/textures/_o_circumflex_.png index 5e4c6be6a..8acca66c9 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_o_circumflex_.png and b/mods/ITEMS/mcl_signs/textures/_o_circumflex_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_dash.png b/mods/ITEMS/mcl_signs/textures/_o_dash.png index 9e5de53d1..0f0d638ff 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_o_dash.png and b/mods/ITEMS/mcl_signs/textures/_o_dash.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_dash_.png b/mods/ITEMS/mcl_signs/textures/_o_dash_.png index badbe9b88..b6e98f1ee 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_o_dash_.png and b/mods/ITEMS/mcl_signs/textures/_o_dash_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_grave.png b/mods/ITEMS/mcl_signs/textures/_o_grave.png index b6b31a9a6..861327e27 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_o_grave.png and b/mods/ITEMS/mcl_signs/textures/_o_grave.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_grave_.png b/mods/ITEMS/mcl_signs/textures/_o_grave_.png index d34e9d71c..7ab9e374b 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_o_grave_.png and b/mods/ITEMS/mcl_signs/textures/_o_grave_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_sup.png b/mods/ITEMS/mcl_signs/textures/_o_sup.png index eeff0a295..bbabcf8c0 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_o_sup.png and b/mods/ITEMS/mcl_signs/textures/_o_sup.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_tilde.png b/mods/ITEMS/mcl_signs/textures/_o_tilde.png index 6cbd7cec0..3c95094bb 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_o_tilde.png and b/mods/ITEMS/mcl_signs/textures/_o_tilde.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_o_tilde_.png b/mods/ITEMS/mcl_signs/textures/_o_tilde_.png index bb0616918..8f980dd98 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_o_tilde_.png and b/mods/ITEMS/mcl_signs/textures/_o_tilde_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_oe.png b/mods/ITEMS/mcl_signs/textures/_oe.png index 9b6892155..693838ce7 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_oe.png and b/mods/ITEMS/mcl_signs/textures/_oe.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_oe_.png b/mods/ITEMS/mcl_signs/textures/_oe_.png index 73b4da80e..c66b72ba2 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_oe_.png and b/mods/ITEMS/mcl_signs/textures/_oe_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_p.png b/mods/ITEMS/mcl_signs/textures/_p.png index 08f8534d0..8d0efe264 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_p.png and b/mods/ITEMS/mcl_signs/textures/_p.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_p_.png b/mods/ITEMS/mcl_signs/textures/_p_.png index 2ff300509..964387e64 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_p_.png and b/mods/ITEMS/mcl_signs/textures/_p_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_paragraph.png b/mods/ITEMS/mcl_signs/textures/_paragraph.png index 52c162120..cfbf0af51 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_paragraph.png and b/mods/ITEMS/mcl_signs/textures/_paragraph.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_pilcrow.png b/mods/ITEMS/mcl_signs/textures/_pilcrow.png index 9764ff8b5..cf9bbc778 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_pilcrow.png and b/mods/ITEMS/mcl_signs/textures/_pilcrow.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_plus_minus.png b/mods/ITEMS/mcl_signs/textures/_plus_minus.png index e7c3f1200..b9b79ec32 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_plus_minus.png and b/mods/ITEMS/mcl_signs/textures/_plus_minus.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_pound.png b/mods/ITEMS/mcl_signs/textures/_pound.png index 31d38d392..04a02d462 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_pound.png and b/mods/ITEMS/mcl_signs/textures/_pound.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_pr.png b/mods/ITEMS/mcl_signs/textures/_pr.png index c8783948d..21b8fbf80 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_pr.png and b/mods/ITEMS/mcl_signs/textures/_pr.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ps.png b/mods/ITEMS/mcl_signs/textures/_ps.png index 74b1f5b8e..37527155f 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_ps.png and b/mods/ITEMS/mcl_signs/textures/_ps.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_q.png b/mods/ITEMS/mcl_signs/textures/_q.png index b5fbcc27d..a48222e28 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_q.png and b/mods/ITEMS/mcl_signs/textures/_q.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_q_.png b/mods/ITEMS/mcl_signs/textures/_q_.png index 674799413..50f00af20 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_q_.png and b/mods/ITEMS/mcl_signs/textures/_q_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_qo.png b/mods/ITEMS/mcl_signs/textures/_qo.png index c7b87be68..9eaca2bd7 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_qo.png and b/mods/ITEMS/mcl_signs/textures/_qo.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_qu.png b/mods/ITEMS/mcl_signs/textures/_qu.png index 1458c7e10..51dff64f3 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_qu.png and b/mods/ITEMS/mcl_signs/textures/_qu.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_qu_inv.png b/mods/ITEMS/mcl_signs/textures/_qu_inv.png index 757bd06db..b2fa4275e 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_qu_inv.png and b/mods/ITEMS/mcl_signs/textures/_qu_inv.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_r.png b/mods/ITEMS/mcl_signs/textures/_r.png index 709c53889..6b80bb254 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_r.png and b/mods/ITEMS/mcl_signs/textures/_r.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_r_.png b/mods/ITEMS/mcl_signs/textures/_r_.png index f8b472755..3c1bafc58 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_r_.png and b/mods/ITEMS/mcl_signs/textures/_r_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_rc.png b/mods/ITEMS/mcl_signs/textures/_rc.png index 8b66915e6..b8ea5b70e 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_rc.png and b/mods/ITEMS/mcl_signs/textures/_rc.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_re.png b/mods/ITEMS/mcl_signs/textures/_re.png index 8fdaf4d24..3f7dda14d 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_re.png and b/mods/ITEMS/mcl_signs/textures/_re.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_registered.png b/mods/ITEMS/mcl_signs/textures/_registered.png index 9a78dda3c..0e510a2a7 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_registered.png and b/mods/ITEMS/mcl_signs/textures/_registered.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_s.png b/mods/ITEMS/mcl_signs/textures/_s.png index 4c47aee01..43c314be1 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_s.png and b/mods/ITEMS/mcl_signs/textures/_s.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_s_.png b/mods/ITEMS/mcl_signs/textures/_s_.png index 08cf6ff68..4edf86115 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_s_.png and b/mods/ITEMS/mcl_signs/textures/_s_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_sl.png b/mods/ITEMS/mcl_signs/textures/_sl.png index 413aa5778..1b4cf0f58 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_sl.png and b/mods/ITEMS/mcl_signs/textures/_sl.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_sm.png b/mods/ITEMS/mcl_signs/textures/_sm.png index 460c5d6dd..2d7dc7310 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_sm.png and b/mods/ITEMS/mcl_signs/textures/_sm.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_sp.png b/mods/ITEMS/mcl_signs/textures/_sp.png index 4aae0ea85..27db127b7 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_sp.png and b/mods/ITEMS/mcl_signs/textures/_sp.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_sr.png b/mods/ITEMS/mcl_signs/textures/_sr.png index afefa91b2..b40144656 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_sr.png and b/mods/ITEMS/mcl_signs/textures/_sr.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_sz.png b/mods/ITEMS/mcl_signs/textures/_sz.png index 56d2847a1..6e323629a 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_sz.png and b/mods/ITEMS/mcl_signs/textures/_sz.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_t.png b/mods/ITEMS/mcl_signs/textures/_t.png index e750dd98e..e175268c3 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_t.png and b/mods/ITEMS/mcl_signs/textures/_t.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_t_.png b/mods/ITEMS/mcl_signs/textures/_t_.png index d7aabd04a..6fbae7a18 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_t_.png and b/mods/ITEMS/mcl_signs/textures/_t_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_thorn.png b/mods/ITEMS/mcl_signs/textures/_thorn.png index e44f23d85..3d3b4359d 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_thorn.png and b/mods/ITEMS/mcl_signs/textures/_thorn.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_thorn_.png b/mods/ITEMS/mcl_signs/textures/_thorn_.png index 1b6d2558b..add982bc1 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_thorn_.png and b/mods/ITEMS/mcl_signs/textures/_thorn_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_times_cross.png b/mods/ITEMS/mcl_signs/textures/_times_cross.png index 25af91b68..f6c6cd310 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_times_cross.png and b/mods/ITEMS/mcl_signs/textures/_times_cross.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_times_dot.png b/mods/ITEMS/mcl_signs/textures/_times_dot.png index 42dac52bc..92b5dae14 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_times_dot.png and b/mods/ITEMS/mcl_signs/textures/_times_dot.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_tl.png b/mods/ITEMS/mcl_signs/textures/_tl.png index 5f1b4fb43..e4eaf45a7 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_tl.png and b/mods/ITEMS/mcl_signs/textures/_tl.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_u.png b/mods/ITEMS/mcl_signs/textures/_u.png index 2665e5685..1c81b91cc 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_u.png and b/mods/ITEMS/mcl_signs/textures/_u.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_u_.png b/mods/ITEMS/mcl_signs/textures/_u_.png index d04ff5481..06bac7dd9 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_u_.png and b/mods/ITEMS/mcl_signs/textures/_u_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_u_acute.png b/mods/ITEMS/mcl_signs/textures/_u_acute.png index 580f61042..04fe159d8 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_u_acute.png and b/mods/ITEMS/mcl_signs/textures/_u_acute.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_u_acute_.png b/mods/ITEMS/mcl_signs/textures/_u_acute_.png index 9237d3caf..266731981 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_u_acute_.png and b/mods/ITEMS/mcl_signs/textures/_u_acute_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_u_circumflex.png b/mods/ITEMS/mcl_signs/textures/_u_circumflex.png index 2b238be12..b402d9083 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_u_circumflex.png and b/mods/ITEMS/mcl_signs/textures/_u_circumflex.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_u_circumflex_.png b/mods/ITEMS/mcl_signs/textures/_u_circumflex_.png index 1608ecf17..6e2bb85d2 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_u_circumflex_.png and b/mods/ITEMS/mcl_signs/textures/_u_circumflex_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_u_grave.png b/mods/ITEMS/mcl_signs/textures/_u_grave.png index 051280428..51fff9c2e 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_u_grave.png and b/mods/ITEMS/mcl_signs/textures/_u_grave.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_u_grave_.png b/mods/ITEMS/mcl_signs/textures/_u_grave_.png index 668685793..2605b3eca 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_u_grave_.png and b/mods/ITEMS/mcl_signs/textures/_u_grave_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ue.png b/mods/ITEMS/mcl_signs/textures/_ue.png index 6249aaebb..d6af6eb7b 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_ue.png and b/mods/ITEMS/mcl_signs/textures/_ue.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_ue_.png b/mods/ITEMS/mcl_signs/textures/_ue_.png index 3193a9412..52b4c9298 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_ue_.png and b/mods/ITEMS/mcl_signs/textures/_ue_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_un.png b/mods/ITEMS/mcl_signs/textures/_un.png index d65f12d4e..5da6b09a7 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_un.png and b/mods/ITEMS/mcl_signs/textures/_un.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_v.png b/mods/ITEMS/mcl_signs/textures/_v.png index 888b2f1cf..390e3aae3 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_v.png and b/mods/ITEMS/mcl_signs/textures/_v.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_v_.png b/mods/ITEMS/mcl_signs/textures/_v_.png index f2ecbf143..5e27b773e 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_v_.png and b/mods/ITEMS/mcl_signs/textures/_v_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_vb.png b/mods/ITEMS/mcl_signs/textures/_vb.png index ca2e5667a..d23d3a074 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_vb.png and b/mods/ITEMS/mcl_signs/textures/_vb.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_w.png b/mods/ITEMS/mcl_signs/textures/_w.png index 6c2eea3e1..1b8dc528e 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_w.png and b/mods/ITEMS/mcl_signs/textures/_w.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_w_.png b/mods/ITEMS/mcl_signs/textures/_w_.png index f1e26c108..259b599b9 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_w_.png and b/mods/ITEMS/mcl_signs/textures/_w_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_x.png b/mods/ITEMS/mcl_signs/textures/_x.png index 3eb2d52d7..746fa1776 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_x.png and b/mods/ITEMS/mcl_signs/textures/_x.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_x_.png b/mods/ITEMS/mcl_signs/textures/_x_.png index bcb351d56..05300eca7 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_x_.png and b/mods/ITEMS/mcl_signs/textures/_x_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_y.png b/mods/ITEMS/mcl_signs/textures/_y.png index 7cd1d87b7..87b45d413 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_y.png and b/mods/ITEMS/mcl_signs/textures/_y.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_y_.png b/mods/ITEMS/mcl_signs/textures/_y_.png index b5f49850c..de9a88db4 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_y_.png and b/mods/ITEMS/mcl_signs/textures/_y_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_y_acute.png b/mods/ITEMS/mcl_signs/textures/_y_acute.png index 37cb54b30..1fd9679d1 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_y_acute.png and b/mods/ITEMS/mcl_signs/textures/_y_acute.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_y_acute_.png b/mods/ITEMS/mcl_signs/textures/_y_acute_.png index bcc15c41c..18c5a5528 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_y_acute_.png and b/mods/ITEMS/mcl_signs/textures/_y_acute_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_y_diaresis.png b/mods/ITEMS/mcl_signs/textures/_y_diaresis.png index 135a8ce25..ecb56c237 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_y_diaresis.png and b/mods/ITEMS/mcl_signs/textures/_y_diaresis.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_yen.png b/mods/ITEMS/mcl_signs/textures/_yen.png index ec4ad65ee..7ea4e0094 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_yen.png and b/mods/ITEMS/mcl_signs/textures/_yen.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_z.png b/mods/ITEMS/mcl_signs/textures/_z.png index 8a710780a..62a89e647 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_z.png and b/mods/ITEMS/mcl_signs/textures/_z.png differ diff --git a/mods/ITEMS/mcl_signs/textures/_z_.png b/mods/ITEMS/mcl_signs/textures/_z_.png index 6192800b4..dcdf0ab8d 100644 Binary files a/mods/ITEMS/mcl_signs/textures/_z_.png and b/mods/ITEMS/mcl_signs/textures/_z_.png differ diff --git a/mods/ITEMS/mcl_signs/textures/default_sign.png b/mods/ITEMS/mcl_signs/textures/default_sign.png index 077983118..8fcee7e9f 100644 Binary files a/mods/ITEMS/mcl_signs/textures/default_sign.png and b/mods/ITEMS/mcl_signs/textures/default_sign.png differ diff --git a/mods/ITEMS/mcl_signs/textures/default_sign_dark.png b/mods/ITEMS/mcl_signs/textures/default_sign_dark.png new file mode 100644 index 000000000..016098238 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/default_sign_dark.png differ diff --git a/mods/ITEMS/mcl_signs/textures/default_sign_greyscale.png b/mods/ITEMS/mcl_signs/textures/default_sign_greyscale.png new file mode 100644 index 000000000..570851a6a Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/default_sign_greyscale.png differ diff --git a/mods/ITEMS/mcl_signs/textures/mcl_signs_sign_dark.png b/mods/ITEMS/mcl_signs/textures/mcl_signs_sign_dark.png new file mode 100644 index 000000000..6189e7709 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/mcl_signs_sign_dark.png differ diff --git a/mods/ITEMS/mcl_signs/textures/mcl_signs_sign_greyscale.png b/mods/ITEMS/mcl_signs/textures/mcl_signs_sign_greyscale.png new file mode 100644 index 000000000..845a8d857 Binary files /dev/null and b/mods/ITEMS/mcl_signs/textures/mcl_signs_sign_greyscale.png differ diff --git a/settingtypes.txt b/settingtypes.txt index 832025a77..d2d5130d8 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -219,3 +219,6 @@ mcl_logging_mapgen (Chunk generation logging) bool false # If enabled generated structures will be logged mcl_logging_structures (Structure generation logging) bool true + +#Complete debug logging for mcl_signs events. Use this if you have issues with signs. +mcl_logging_mcl_signs (Complete debug logging for mcl_signs) bool true