From 9c0e9964a61950c374b46b7a623d3483f5d0fe7c Mon Sep 17 00:00:00 2001 From: Code-Sploit Date: Fri, 16 Apr 2021 11:47:21 +0000 Subject: [PATCH] Add smithing table W.I.P --- mods/ITEMS/mcl_smithing_table/init.lua | 43 ++++++++++++++++++ .../locale/mcl_anvils.de.tr | 16 +++++++ .../locale/mcl_anvils.es.tr | 15 ++++++ .../locale/mcl_anvils.fr.tr | 16 +++++++ .../locale/mcl_anvils.ru.tr | 16 +++++++ .../mcl_smithing_table/locale/template.txt | 16 +++++++ mods/ITEMS/mcl_smithing_table/mod.conf | 2 + .../textures/mcl_smithing_table_bottom.png | Bin 0 -> 206 bytes .../textures/mcl_smithing_table_front.png | Bin 0 -> 312 bytes .../textures/mcl_smithing_table_inventory.png | Bin 0 -> 699 bytes .../textures/mcl_smithing_table_side.png | Bin 0 -> 315 bytes .../textures/mcl_smithing_table_top.png | Bin 0 -> 260 bytes 12 files changed, 124 insertions(+) create mode 100644 mods/ITEMS/mcl_smithing_table/init.lua create mode 100644 mods/ITEMS/mcl_smithing_table/locale/mcl_anvils.de.tr create mode 100644 mods/ITEMS/mcl_smithing_table/locale/mcl_anvils.es.tr create mode 100644 mods/ITEMS/mcl_smithing_table/locale/mcl_anvils.fr.tr create mode 100644 mods/ITEMS/mcl_smithing_table/locale/mcl_anvils.ru.tr create mode 100644 mods/ITEMS/mcl_smithing_table/locale/template.txt create mode 100644 mods/ITEMS/mcl_smithing_table/mod.conf create mode 100644 mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_bottom.png create mode 100644 mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_front.png create mode 100644 mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_inventory.png create mode 100644 mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_side.png create mode 100644 mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_top.png diff --git a/mods/ITEMS/mcl_smithing_table/init.lua b/mods/ITEMS/mcl_smithing_table/init.lua new file mode 100644 index 000000000..b57842d0f --- /dev/null +++ b/mods/ITEMS/mcl_smithing_table/init.lua @@ -0,0 +1,43 @@ +local formspec = "size[9,9]" .. + "label[0,4.0;" .. minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, "Inventory")) .. "]" .. + "list[current_player;main;0,4.5;9,3;9]" .. + mcl_formspec.get_itemslot_bg(0,4.5,9,3) .. + "list[current_player;main;0,7.74;9,1;]" .. + mcl_formspec.get_itemslot_bg(0,7.74,9,1) .. + "list[context;input;1,2.5;1,1;]" .. + mcl_formspec.get_itemslot_bg(1,2.5,1,1) .. + "list[context;input;4,2.5;1,1;1]" .. + mcl_formspec.get_itemslot_bg(4,2.5,1,1) .. + "list[context;output;8,2.5;1,1;]" .. + mcl_formspec.get_itemslot_bg(8,2.5,1,1) .. + "label[3,0.1;" .. minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, "Upgrade Gear")) .. "]" .. + "button[7,0.7;2,1;name_button;" .. minetest.formspec_escape("Upgrade Gear") .. "]" .. + "listring[context;output]".. + "listring[current_player;main]".. + "listring[context;input]".. + "listring[current_player;main]" + + +local function upgrade(itemstack) + itemstack:set_name(itemstack:get_name():gsub("diamond", "netherite")) +end + +minetest.register_node("mcl_smithing_table:table", { + description = "Smithing table", + + stack_max = 64, + groups = {pickaxey = 2, deco_block = true}, + + tiles = { + "mcl_smithing_table_top.png", "mcl_smithing_table_front.png", "mcl_smithing_table_side.png", + "mcl_smithing_table_side.png", "mcl_smithing_table_side.png", "mcl_smithing_table_side.png", + "mcl_smithing_table_side.png", "mcl_smithing_table_side.png", "mcl_smithing_table_bottom.png" + }, + + on_construct = function(pos) + minetest.get_meta(pos):set_string("formspec", formspec) + end, + + _mcl_blast_resistance = 2.5, + _mcl_hardness = 2.5 +}) \ No newline at end of file diff --git a/mods/ITEMS/mcl_smithing_table/locale/mcl_anvils.de.tr b/mods/ITEMS/mcl_smithing_table/locale/mcl_anvils.de.tr new file mode 100644 index 000000000..9e7d88337 --- /dev/null +++ b/mods/ITEMS/mcl_smithing_table/locale/mcl_anvils.de.tr @@ -0,0 +1,16 @@ +# textdomain: mcl_anvils +Set Name=Name setzen +Repair and Name=Reparieren und benennen +Inventory=Inventar +Anvil=Amboss +The anvil allows you to repair tools and armor, and to give names to items. It has a limited durability, however. Don't let it fall on your head, it could be quite painful!=Der Amboss ermöglicht es, Werkzeuge und Rüstung zu reparieren und Gegenstände zu benennen. Er hat jedoch eine begrenzte Lebensdauer. Lassen Sie ihn nicht auf Ihren Kopf fallen, das könnte ziemlich schmerzhaft sein! +To use an anvil, rightclick it. An anvil has 2 input slots (on the left) and one output slot.=Um einen Amboss zu benutzen, rechtsklicken Sie auf ihn. Ein Amboss hat 2 Eingabeplätze (links) und einen Ausgabeplatz (rechts). +To rename items, put an item stack in one of the item slots while keeping the other input slot empty. Type in a name, hit enter or “Set Name”, then take the renamed item from the output slot.=Um Gegenstände umzubenennen, platzieren Sie einen Gegenstand in einen der Eingangsplätze und lassen Sie den anderen frei. Geben Sie einen Namen ein und drücken Sie die Eingabetaste oder „Name setzen”, dann nehmen Sie den umbenannten Gegenstand an sich. +There are two possibilities to repair tools (and armor):=Es gibt zwei Möglichkeiten, Werkzeuge (und Rüstung) zu reparieren: +• Tool + Tool: Place two tools of the same type in the input slots. The “health” of the repaired tool is the sum of the “health” of both input tools, plus a 12% bonus.=• Werkzeug + Werkzeug: Platzieren sie zwei gleiche Werkzeuge in die Eingangsplätze. Der Zustand des reparierten Werkzeugs ist die Summe des Zustands beider Eingangswerkzeuge, plus einem Bonus von 12%. +• Tool + Material: Some tools can also be repaired by combining them with an item that it's made of. For example, iron pickaxes can be repaired with iron ingots. This repairs the tool by 25%.=• Werkzeug + Material: Einige Werkzeuge können auch repariert werden, indem man sie mit einem Gegenstand, aus dem sie gemacht worden sind, kombiniert. Zum Beispiel können Eisenspitzhacken mit Eisenbarren repariert werden. Dadurch wird das Werkzeug um 25% repariert. +Armor counts as a tool. It is possible to repair and rename a tool in a single step.=Rüstung zählt als Werkzeug. Es ist möglich, ein Werkzeug in einem Arbeitsschritt zu reparieren und zu benennen. +The anvil has limited durability and 3 damage levels: undamaged, slightly damaged and very damaged. Each time you repair or rename something, there is a 12% chance the anvil gets damaged. Anvils also have a chance of being damaged when they fall by more than 1 block. If a very damaged anvil is damaged again, it is destroyed.=Der Amboss hat begrenze Lebensdauer und 3 Schadensstufen: Kein Schaden, leicht beschädigt, und stark beschädigt. Jedes mal, wenn Sie etwas reparieren oder umbenennen, gibt es eine 12%-ige Chance, dass der Amboss Schaden nimmt. Ambosse können auch beschädigt werden, wenn sie um mehr als 1 Block fallen. Wenn ein sehr beschädigter Amboss erneut beschädigt wird, wird er zerstört. +Slightly Damaged Anvil=Leicht beschädigter Amboss +Very Damaged Anvil=Stark beschädigter Amboss +Repair and rename items=Für die Reparatur und Umbenennung von Gegenständen diff --git a/mods/ITEMS/mcl_smithing_table/locale/mcl_anvils.es.tr b/mods/ITEMS/mcl_smithing_table/locale/mcl_anvils.es.tr new file mode 100644 index 000000000..7212b92ba --- /dev/null +++ b/mods/ITEMS/mcl_smithing_table/locale/mcl_anvils.es.tr @@ -0,0 +1,15 @@ +# textdomain: mcl_anvils +Set Name=Establece un nombre +Repair and Name=Reparar y nombrar +Inventory=Inventario +Anvil=Yunque +The anvil allows you to repair tools and armor, and to give names to items. It has a limited durability, however. Don't let it fall on your head, it could be quite painful!=El yunque le permite reparar herramientas y armaduras, y dar nombres a los elementos. Sin embargo, tiene una durabilidad limitada. No lo dejes caer sobre tu cabeza, ¡podría ser bastante doloroso! +To use an anvil, rightclick it. An anvil has 2 input slots (on the left) and one output slot.=Para usar un yunque, haga clic derecho sobre él. Un yunque tiene 2 ranuras de entrada (a la izquierda) y una ranura de salida. +To rename items, put an item stack in one of the item slots while keeping the other input slot empty. Type in a name, hit enter or “Set Name”, then take the renamed item from the output slot.=Para cambiar el nombre de los elementos, coloque una pila de elementos en una de las ranuras de elementos mientras mantiene vacía la otra ranura de entrada. Escriba un nombre, presione enter o "Establecer nombre", luego obtenga el elemento renombrado en la ranura de salida. +There are two possibilities to repair tools (and armor):=Hay dos posibilidades para reparar herramientas (y armaduras): +• Tool + Tool: Place two tools of the same type in the input slots. The “health” of the repaired tool is the sum of the “health” of both input tools, plus a 12% bonus.=• Herramienta + Herramienta: Coloque dos herramientas del mismo tipo en las ranuras de entrada. La "salud" de la herramienta reparada es la suma de la "salud" de ambas herramientas, con un bono del 12%. +• Tool + Material: Some tools can also be repaired by combining them with an item that it's made of. For example, iron pickaxes can be repaired with iron ingots. This repairs the tool by 25%.=• Herramienta + Material: Algunas herramientas también pueden repararse combinándolas con un elemento del que está hecho. Por ejemplo, los picos de hierro pueden repararse con lingotes de hierro. Esto repara la herramienta en un 25%. +Armor counts as a tool. It is possible to repair and rename a tool in a single step.=La armadura cuenta como una herramienta. Es posible reparar y cambiar el nombre de una herramienta en un solo paso. +The anvil has limited durability and 3 damage levels: undamaged, slightly damaged and very damaged. Each time you repair or rename something, there is a 12% chance the anvil gets damaged. Anvils also have a chance of being damaged when they fall by more than 1 block. If a very damaged anvil is damaged again, it is destroyed.=El yunque tiene una durabilidad limitada y 3 niveles de daño: sin daños, ligeramente dañado y muy dañado. Cada vez que reparas o cambias el nombre de algo, hay un 12% de posibilidades de que el yunque se dañe. Los yunques también tienen la posibilidad de dañarse cuando caen en más de 1 bloque. Si un yunque muy dañado se daña nuevamente, se destruye. +Slightly Damaged Anvil=Yunque dañado +Very Damaged Anvil=Yunque muy dañado diff --git a/mods/ITEMS/mcl_smithing_table/locale/mcl_anvils.fr.tr b/mods/ITEMS/mcl_smithing_table/locale/mcl_anvils.fr.tr new file mode 100644 index 000000000..1f03de8e5 --- /dev/null +++ b/mods/ITEMS/mcl_smithing_table/locale/mcl_anvils.fr.tr @@ -0,0 +1,16 @@ +# textdomain: mcl_anvils +Set Name=Définir le Nom +Repair and Name=Réparation et Nomme +Inventory=Inventaire +Anvil=Enclume +The anvil allows you to repair tools and armor, and to give names to items. It has a limited durability, however. Don't let it fall on your head, it could be quite painful!=L'enclume vous permet de réparer des outils et des armures, et de donner des noms à des objets. Il a cependant une durabilité limitée. Ne la laissez pas tomber sur la tête, cela pourrait être assez douloureux! +To use an anvil, rightclick it. An anvil has 2 input slots (on the left) and one output slot.=Pour utiliser une enclume, faites un clic droit dessus. Une enclume a 2 emplacements d'entrée (à gauche) et un emplacement de sortie. +To rename items, put an item stack in one of the item slots while keeping the other input slot empty. Type in a name, hit enter or “Set Name”, then take the renamed item from the output slot.=Pour renommer des objets, placez une pile d'objets dans l'un des emplacements d'objets tout en laissant l'autre emplacement d'entrée vide. Tapez un nom, appuyez sur Entrée ou sur «Définir le nom», puis prenez l'élément renommé dans l'emplacement de sortie. +There are two possibilities to repair tools (and armor):=Il existe deux possibilités pour réparer les outils (et les armures): +• Tool + Tool: Place two tools of the same type in the input slots. The “health” of the repaired tool is the sum of the “health” of both input tools, plus a 12% bonus.=• Outil + Outil: Placez deux outils du même type dans les emplacements d'entrée. La "santé" de l'outil réparé est la somme de la "santé" des deux outils d'entrée, plus un bonus de 12%. +• Tool + Material: Some tools can also be repaired by combining them with an item that it's made of. For example, iron pickaxes can be repaired with iron ingots. This repairs the tool by 25%.=• Outil + Matériel: Certains outils peuvent également être réparés en les combinant avec un élément dont il est fait. Par exemple, les pioches de fer peuvent être réparées avec des lingots de fer. Cela répare l'outil de 25%. +Armor counts as a tool. It is possible to repair and rename a tool in a single step.=L'armure compte comme un outil. Il est possible de réparer et de renommer un outil en une seule étape. +The anvil has limited durability and 3 damage levels: undamaged, slightly damaged and very damaged. Each time you repair or rename something, there is a 12% chance the anvil gets damaged. Anvils also have a chance of being damaged when they fall by more than 1 block. If a very damaged anvil is damaged again, it is destroyed.=L'enclume a une durabilité limitée et 3 niveaux de dommages: en bon état, légèrement endommagé et très endommagé. Chaque fois que vous réparez ou renommez quelque chose, il y a 12% de chances que l'enclume soit endommagée. Les enclumes ont également une chance d'être endommagées lorsqu'elles tombent de plus d'un bloc. Si une enclume très endommagée est à nouveau endommagée, elle est détruite. +Slightly Damaged Anvil=Enclume Légèrement Endommagée +Very Damaged Anvil=Enclume Très Endommagée +Repair and rename items=Réparer et renommer des objets diff --git a/mods/ITEMS/mcl_smithing_table/locale/mcl_anvils.ru.tr b/mods/ITEMS/mcl_smithing_table/locale/mcl_anvils.ru.tr new file mode 100644 index 000000000..20281bd6b --- /dev/null +++ b/mods/ITEMS/mcl_smithing_table/locale/mcl_anvils.ru.tr @@ -0,0 +1,16 @@ +# textdomain: mcl_anvils +Set Name=Дать имя +Repair and Name=Починить и дать имя +Inventory=Инвентарь +Anvil=Наковальня +The anvil allows you to repair tools and armor, and to give names to items. It has a limited durability, however. Don't let it fall on your head, it could be quite painful!=Наковальня позволяет ремонтировать инструменты и защиту, а также давать имена предметам. Но она имеет ограниченный срок службы. Не дайте ей упасть вам на голову, это может быть больно! +To use an anvil, rightclick it. An anvil has 2 input slots (on the left) and one output slot.=Чтобы воспользоваться наковальней, кликните по ней правой кнопкой. Наковальня имеет два входных отсека (слева) и один выходной. +To rename items, put an item stack in one of the item slots while keeping the other input slot empty. Type in a name, hit enter or “Set Name”, then take the renamed item from the output slot.=Для переименования положите стопку предметов в один отсек, второй оставьте пустым. Наберите имя, нажмите [Enter] или “Дать имя” и заберите переименованные предметы из выходного отсека. +There are two possibilities to repair tools (and armor):=Есть два способа отремонтировать инструменты (и защиту): +• Tool + Tool: Place two tools of the same type in the input slots. The “health” of the repaired tool is the sum of the “health” of both input tools, plus a 12% bonus.=• Инструмент + Инструмент: Положите два инструмента одного типа во входные отсеки. “Здоровье” отремонтированного инструмента будет равно сумме “здоровья” каждого из них, плюс 12% бонус. +• Tool + Material: Some tools can also be repaired by combining them with an item that it's made of. For example, iron pickaxes can be repaired with iron ingots. This repairs the tool by 25%.=• Инструмент + Материал: Некоторые инструменты можно также ремонтировать, добавляя к ним предмет, из которого они сделаны. Например, железные кирки ремонтируются добавлением слитков железа. Таким способом инструмент восстанавливается на 25%. +Armor counts as a tool. It is possible to repair and rename a tool in a single step.=Защиты считается за инструмент. Можно ремонтировать и переименовывать за одно действие. +The anvil has limited durability and 3 damage levels: undamaged, slightly damaged and very damaged. Each time you repair or rename something, there is a 12% chance the anvil gets damaged. Anvils also have a chance of being damaged when they fall by more than 1 block. If a very damaged anvil is damaged again, it is destroyed.=Наковальня имеет ограниченный срок службы и 3 уровня износа: новая, немного изношенная, сильно повреждённая. Каждый раз, ремонтируя или переименовывая что-либо, вы имеете 12-процентный шанс повредить наковальню. Наковальни также могут повреждаться, когда они падают с высоте более 1 блока. Если повреждённая наковальня повреждается снова, то она уничтожается. +Slightly Damaged Anvil=Немного изношенная наковальня +Very Damaged Anvil=Сильно повреждённая наковальня +Repair and rename items=Ремонтирует и переименовывает предметы diff --git a/mods/ITEMS/mcl_smithing_table/locale/template.txt b/mods/ITEMS/mcl_smithing_table/locale/template.txt new file mode 100644 index 000000000..ebc741c00 --- /dev/null +++ b/mods/ITEMS/mcl_smithing_table/locale/template.txt @@ -0,0 +1,16 @@ +# textdomain: mcl_anvils +Set Name= +Repair and Name= +Inventory= +Anvil= +The anvil allows you to repair tools and armor, and to give names to items. It has a limited durability, however. Don't let it fall on your head, it could be quite painful!= +To use an anvil, rightclick it. An anvil has 2 input slots (on the left) and one output slot.= +To rename items, put an item stack in one of the item slots while keeping the other input slot empty. Type in a name, hit enter or “Set Name”, then take the renamed item from the output slot.= +There are two possibilities to repair tools (and armor):= +• Tool + Tool: Place two tools of the same type in the input slots. The “health” of the repaired tool is the sum of the “health” of both input tools, plus a 12% bonus.= +• Tool + Material: Some tools can also be repaired by combining them with an item that it's made of. For example, iron pickaxes can be repaired with iron ingots. This repairs the tool by 25%.= +Armor counts as a tool. It is possible to repair and rename a tool in a single step.= +The anvil has limited durability and 3 damage levels: undamaged, slightly damaged and very damaged. Each time you repair or rename something, there is a 12% chance the anvil gets damaged. Anvils also have a chance of being damaged when they fall by more than 1 block. If a very damaged anvil is damaged again, it is destroyed.= +Slightly Damaged Anvil= +Very Damaged Anvil= +Repair and rename items= diff --git a/mods/ITEMS/mcl_smithing_table/mod.conf b/mods/ITEMS/mcl_smithing_table/mod.conf new file mode 100644 index 000000000..aee93fa65 --- /dev/null +++ b/mods/ITEMS/mcl_smithing_table/mod.conf @@ -0,0 +1,2 @@ +name = mcl_smithing_table +depends = mcl_colors, mcl_formspec diff --git a/mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_bottom.png b/mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..59833b5ea20686a3eae16a005d9abec43bcd9022 GIT binary patch literal 206 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Q$1ZALo9leCrq05oBvSUr=Ws2 zD$0DvUewHx=xBSH++g^{mF1w2f>hhZpC^(Em>txbSR6_wOw!?M+sQCn!iT?$@r2*e zc1N~@F^3s0a|o$iW!S)-P^Wa1VaC!F>4rzFGZ;l$8CS9`sA!zyu;d2Anz#koCWo#p zl4#Jssno5UZm@yz#Z1n4Hm7OFPxKlHe@x9xG4qjUklR_Tv#IaRJ)i>_JYD@<);T3K F0RY}yN}2!w literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_front.png b/mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_front.png new file mode 100644 index 0000000000000000000000000000000000000000..55875ef5459ab6e0bc4ac530c51d8b97e044ff7b GIT binary patch literal 312 zcmV-80muG{P)m-ckEr&y1TnCUc7kj z+`0e%|96?pEC&=~ED7=pW^j0RBMrn!@^*J&=wOxg0CG4BJR*x37`TN&n2}-D90{Nx zdx@v7EBg~>VJ|yWWQ_p4Dl_cCpp* zqK?M=v(oa+fx2l59@yWJzvrO7$*(=Y>SC#om--<;rk#?S7c0Hn+rT;pH44^~(Bf+9l8B zdoC9MIjgL7(}A2FmrH=0EbCklXUpXZAVTx$7=_s?9xNb#jStr25PfrPnHx ffiXE8K+RV9+KToW>o zyX+Vj=`ya?nZy_^*mKJ7mASwK#h}+8Y0lWfLl_4Z`eJUh>ve>r)s7a35I^ttg207* z&}{@o#R8J+xTky{xs1LDa1Uy<2T00v5}&VkycDH^uHU9ZSpz6!jMGH`jgsbd5-qYL z=If{kKppXHz7hCT)|&4D*2RJf{MA3jR%7ei0s;9*6tG^=M8@7bQ2|^-u4DW`z zI}XAy5JY_%s1Q^nq5;t$lro~u1-O3;nn<&H-q=u#{8{hw+GCgJw0xx7eGYkUe!W+D zOgUC^@_2bvYQ;PbfCJ~@8X{!3KdfTRkf?ykSxVM!8Lr%7ngYku5R2Sb>+%V$jzEAG zs+MXbLfTsBz^_E!jVsvzXxqPgh$HZU(4Jm0 zD~LPj9ieAo1>jTmvu*8|Eesn~ZvH5O