From 82071bf480a2a117338bf15a47ed4327a99df7d9 Mon Sep 17 00:00:00 2001 From: Handful of Frogs Date: Fri, 10 May 2024 22:04:34 +0300 Subject: [PATCH] feat: new plate textures --- api.lua | 1 + craftitems.lua | 55 ++++++++++++++-------- textures/industrialtest_plate.png | Bin 851 -> 229 bytes textures/industrialtest_plate_overlay.png | Bin 0 -> 144 bytes 4 files changed, 37 insertions(+), 19 deletions(-) create mode 100644 textures/industrialtest_plate_overlay.png diff --git a/api.lua b/api.lua index ca21cd3..f8cb9e6 100644 --- a/api.lua +++ b/api.lua @@ -672,6 +672,7 @@ industrialtest.api.registerPlate=function(name,displayName,resources,color,regis minetest.register_craftitem("industrialtest:"..name,{ description=displayName, inventory_image="industrialtest_plate.png", + inventory_overlay="industrialtest_plate_overlay.png", color=color }) if registerCompressorRecipe then diff --git a/craftitems.lua b/craftitems.lua index 007af39..c9b54d7 100644 --- a/craftitems.lua +++ b/craftitems.lua @@ -15,6 +15,23 @@ -- along with this program. If not, see . local S=minetest.get_translator("industrialtest") +local colors={ + bronze="#be4325ff", + clay="#707070ff", + coal="#262523ff", + copper="#bf644aff", + diamond="#77cefbff", + gold="#eac162ff", + iron="#afaca5ff", + lapis_lazuli="#3a4cceff", + lead="#6d6393ff", + mese="#909000ff", + obsidian="#292843ff", + refined_iron="#94bab9ff", + sulfur="#b88805ff", + tin="#ebd182ff", + uranium="#3b8c09ff", +} -- Power storage items minetest.register_tool("industrialtest:re_battery",{ @@ -197,13 +214,13 @@ if industrialtest.mclAvailable then count=2 }) end -industrialtest.api.registerResourceDust("coal","Coal",resources,"#262523ff",true) +industrialtest.api.registerResourceDust("coal","Coal",resources,colors.coal,true) industrialtest.api.registerResourceDust("clay","Clay",{ { resource=industrialtest.elementKeys.clayBlock, count=2 } -},"#707070ff",true) +},colors.clay,true) resources={ { resource=industrialtest.elementKeys.diamondBlock, @@ -221,7 +238,7 @@ if industrialtest.mclAvailable then count=2 }) end -industrialtest.api.registerResourceDust("diamond","Diamond",resources,"#77cefbff",true) +industrialtest.api.registerResourceDust("diamond","Diamond",resources,colors.diamond,true) minetest.register_craft({ type="cooking", output=industrialtest.elementKeys.diamond, @@ -248,7 +265,7 @@ if industrialtest.mclAvailable then count=2 }) end -industrialtest.api.registerResourceDust("iron","Iron",resources,"#afaca5ff",true) +industrialtest.api.registerResourceDust("iron","Iron",resources,colors.iron,true) minetest.register_craft({ type="cooking", output=industrialtest.elementKeys.ironIngot, @@ -269,9 +286,9 @@ if industrialtest.mclAvailable then count=9 }, {resource="mcl_core:lapis_lazuli"} - },"#3a4cceff",true) + },colors.lapis_lazuli,true) end -industrialtest.api.registerResourceDust("obsidian","Obsidian",{{resource=industrialtest.elementKeys.obsidian}},"#292843ff",true) +industrialtest.api.registerResourceDust("obsidian","Obsidian",{{resource=industrialtest.elementKeys.obsidian}},colors.obsidian,true) resources={ { resource=industrialtest.elementKeys.goldBlock, @@ -293,7 +310,7 @@ if industrialtest.mclAvailable then count=2 }) end -industrialtest.api.registerResourceDust("gold","Gold",resources,"#eac162ff",true) +industrialtest.api.registerResourceDust("gold","Gold",resources,colors.gold,true) minetest.register_craft({ type="cooking", output=industrialtest.elementKeys.goldIngot, @@ -320,7 +337,7 @@ if industrialtest.mclAvailable then count=2 }) end -industrialtest.api.registerResourceDust("copper","Copper",resources,"#bf644aff",true) +industrialtest.api.registerResourceDust("copper","Copper",resources,colors.copper,true) minetest.register_craft({ type="cooking", output=industrialtest.elementKeys.copperIngot, @@ -347,7 +364,7 @@ if industrialtest.mclAvailable then count=2 }) end -industrialtest.api.registerResourceDust("tin","Tin",resources,"#ebd182ff",true) +industrialtest.api.registerResourceDust("tin","Tin",resources,colors.tin,true) minetest.register_craft({ type="cooking", output=industrialtest.elementKeys.tinIngot, @@ -374,7 +391,7 @@ if industrialtest.mclAvailable then count=2 }) end -industrialtest.api.registerResourceDust("uranium","Uranium",resources,"#3b8c09ff",true) +industrialtest.api.registerResourceDust("uranium","Uranium",resources,colors.uranium,true) minetest.register_craft({ type="cooking", output="industrialtest:uranium_ingot", @@ -391,7 +408,7 @@ if industrialtest.mtgAvailable then count=2 }, {resource="default:mese_crystal"} - },"#909000ff",true) + },colors.mese,true) minetest.register_craft({ type="cooking", output="default:mese_crystal", @@ -404,7 +421,7 @@ industrialtest.api.registerResourceDust("bronze","Bronze",{ count=9 }, {resource=industrialtest.elementKeys.bronzeIngot} -},"#be4325ff",true) +},colors.bronze,true) minetest.register_craft({ type="shaped", output="industrialtest:bronze_dust 9", @@ -431,7 +448,7 @@ industrialtest.api.registerRotaryMaceratorModifier({ output="industrialtest:bronze_dust", uses=4 }) -industrialtest.api.registerResourceDust("sulfur","Sulfur",{},"#b88805ff",false) +industrialtest.api.registerResourceDust("sulfur","Sulfur",{},colors.sulfur,false) industrialtest.api.registerExtractorRecipe({ output="industrialtest:sulfur_dust", recipe=industrialtest.elementKeys.gunpowder @@ -450,7 +467,7 @@ industrialtest.api.registerResourceDust("lead","Lead",{ count=2 }, {resource="industrialtest:lead_ingot"} -},"#6d6393ff",true) +},colors.lead,true) minetest.register_craft({ type="cooking", output="industrialtest:lead_ingot", @@ -461,7 +478,7 @@ industrialtest.api.registerResourceDust("refined_iron","Refined Iron",{ resource="industrialtest:refined_iron_ingot", count=1 } -},"#94bab9ff",true) +},colors.refined_iron,true) industrialtest.api.registerRotaryMaceratorModifier({ name=industrialtest.elementKeys.ironLump, modifier=industrialtest.elementKeys.coal, @@ -524,14 +541,14 @@ industrialtest.api.registerPlate("bronze_plate",S("Bronze Plate"),{ resource=industrialtest.elementKeys.bronzeIngot, count=1 } -},"#e48e88ff",true) +},colors.bronze,true) industrialtest.api.registerPlate("copper_plate",S("Copper Plate"),{ { resource=industrialtest.elementKeys.copperIngot, count=1 } -},"#f48e44ff",true) +},colors.copper,true) industrialtest.api.registerPlate("advanced_alloy",S("Advanced Alloy"),{ { @@ -552,14 +569,14 @@ industrialtest.api.registerPlate("tin_plate",S("Tin Plate"),{ resource=industrialtest.elementKeys.tinIngot, count=1 } -},"#e0e0e0ff",true) +},colors.tin,true) industrialtest.api.registerPlate("lead_plate",S("Lead Plate"),{ { resource="industrialtest:lead_ingot", count=1 } -},"#eafef8ff",true) +},colors.lead,true) industrialtest.api.registerPlate("iridium_plate",S("Iridium Plate"),{},false,"#ffffffff") minetest.register_craft({ diff --git a/textures/industrialtest_plate.png b/textures/industrialtest_plate.png index a176f0cb9b1765d519be778692b46968b2662af7..b9214860f69b0ec3e6577d7dcb5d2f5bbaa1f9a2 100644 GIT binary patch delta 202 zcmV;*05$*92IT>eBYyx1a7bBm001r{001r{0eGc9b^rhXmq|oHR5(w~ks%JmAP`0A zW*ve{ATZqj3K$dy!4VK3P>41(p@E&5hN|w9pZTB9z}VYty?}FWe^N$keR{v6sg$ym z;l01+KEDpm`83d>bP!;zMO#q%^n`{|3Jn zW{d$EX>4Tx04R}tkv&MmKpe$i(`rR34(%Y~ zkfAzR1Ql_VDi*;)X)CnqU~=gfG-*guTpR`0f`cE6RRM{K$3LSDQzS=msDr-`GAs!_g>b6MfM#aXS^S^J*+g`tABlHoed5hSpLBvKF| zqmBxyun?nFBY(w2n)c%!{$a_@99*t>dpXf!R;e8yzir1PpEi7uOw4-UBXofT1T{G9*Xx(-ewD z;QfrgDG!8if&MkOxAs0xAAl@%wR{5{90Fq{%3k+)cOzeSZ~vZY_xA(H`EtonDgxO6 z000JJOGiWi{{a60|De66laV19e+P6)O+^Ri1QP}^D<0KdYXATM8FWQhbVF}#ZDnqB z07G(RVRU6=Aa`kWXdp*PO;A^X4i^9b0V_#FK~y-)wUbLu!$1%Pt9!?e!Y`v{+n}f9NH6I+z=pU?ThT;`D{iA0ZWNp zjF=f-1fSfP0000cJ44$rjF6*2UngE}XD@6bR literal 0 HcmV?d00001 -- 2.30.2