From 8e7aea0317201f118951f9de40e37b487721ccea Mon Sep 17 00:00:00 2001 From: Nordall <52865650+Nordall@users.noreply.github.com> Date: Sun, 21 Jul 2019 08:57:44 +0200 Subject: [PATCH] Fixed colorizing, added glow variants (#3) --- glass.lua | 317 ++++++++++++++++--------- textures/darkage_glow_glass.png | Bin 0 -> 418 bytes textures/darkage_glow_glass_round.png | Bin 0 -> 499 bytes textures/darkage_glow_glass_square.png | Bin 0 -> 347 bytes 4 files changed, 207 insertions(+), 110 deletions(-) create mode 100644 textures/darkage_glow_glass.png create mode 100644 textures/darkage_glow_glass_round.png create mode 100644 textures/darkage_glow_glass_square.png diff --git a/glass.lua b/glass.lua index 21d4c6b..d95f768 100644 --- a/glass.lua +++ b/glass.lua @@ -1,11 +1,13 @@ --[[ Medival glasses. - The glasses can be colorized using dye. + The glasses can be colorized using dye. Colorization requires unifieddyes installed. Special thanks to Semmett9 for the glass textures. ]] +--[[ Rhombus Glass ]] + minetest.register_node("darkage:glass", { description = "Clean Medieval Glass", drawtype = "glasslike", @@ -26,71 +28,8 @@ minetest.register_craft({ } }) -if minetest.get_modpath("unifieddyes") then - minetest.register_node("darkage:milk_glass", { - description = "Milky Medieval Glass (Good for colorization)", - drawtype = "glasslike", - tiles = {"darkage_milk_glass.png"}, - use_texture_alpha=true, - paramtype = "light", - paramtype2 = "color", - palette = "unifieddyes_palette.png", - sunlight_propagates = true, - groups = {cracky = 3, oddly_breakable_by_hand = 3, not_cuttable=1, ud_param2_colorable = 1}, - sounds = default.node_sound_glass_defaults(), - after_dig_node = unifieddyes.after_dig_node - }) +--[[ Round Glass By Semmett9 aka Infinatum ]] --- Craft - minetest.register_craft({ - output = "darkage:milk_glass 1", - type = "shapeless", - recipe = {"darkage:glass", "dye:white"} - }) - --- Recycling - minetest.register_craft({ - output = "darkage:glass 1", - recipe = {{"darkage:milk_glass"}} - }) -end - ---[[ - Glow Glass -]] -minetest.register_node("darkage:glow_glass", { - description = "Medieval Glow Glass", - drawtype = "glasslike", - tiles = {"darkage_glass.png"}, - use_texture_alpha=true, - paramtype = "light", - sunlight_propagates = true, - light_source = default.LIGHT_MAX-1, - groups = {cracky = 3, oddly_breakable_by_hand = 3, not_cuttable=1}, - sounds = default.node_sound_glass_defaults(), -}) - --- Craft -minetest.register_craft({ - output = "darkage:glass 1", - recipe = { - {"darkage:glow_glass"}, - } -}) - --- Recycling -minetest.register_craft({ - output = "darkage:glow_glass 1", - recipe = { - {"darkage:glass"}, - {"default:torch"}, - } -}) - ---[[ - Round Glass - By Semmett9 aka Infinatum -]] minetest.register_node("darkage:glass_round", { description = "Round Glass", drawtype = "glasslike", @@ -99,7 +38,7 @@ minetest.register_node("darkage:glass_round", { use_texture_alpha = true, sunlight_propagates = true, sounds = default.node_sound_glass_defaults(), - groups = {cracky=3,oddly_breakable_by_hand=3}, + groups = {cracky=3,oddly_breakable_by_hand=3, not_cuttable=1}, }) minetest.register_craft({ @@ -111,40 +50,8 @@ minetest.register_craft({ } }) --- If unifieddyes installed provide a colorizeable variant -if minetest.get_modpath("unifieddyes") then - minetest.register_node("darkage:milk_glass_round", { - description = "Milky Medieval Round Glass (Good for colorization)", - drawtype = "glasslike", - tiles = {"darkage_milk_glass_round.png"}, - use_texture_alpha=true, - paramtype = "light", - paramtype2 = "color", - palette = "unifieddyes_palette.png", - sunlight_propagates = true, - groups = {cracky = 3, oddly_breakable_by_hand = 3, not_cuttable=1, ud_param2_colorable = 1}, - sounds = default.node_sound_glass_defaults(), - after_dig_node = unifieddyes.after_dig_node - }) +--[[ Square glass By Semmett9 aka Infinatum ]] --- Craft - minetest.register_craft({ - output = "darkage:milk_glass_round 1", - type = "shapeless", - recipe = {"darkage:glass_round", "dye:white"} - }) - --- Recycling - minetest.register_craft({ - output = "darkage:glass_round 1", - recipe = {{"darkage:milk_glass_round"}} - }) -end - ---[[ - Square glass - By Semmett9 aka Infinatum -]] minetest.register_node("darkage:glass_square", { description = "Square Glass", drawtype = "glasslike", @@ -153,7 +60,7 @@ minetest.register_node("darkage:glass_square", { use_texture_alpha = true, sunlight_propagates = true, sounds = default.node_sound_glass_defaults(), - groups = {cracky=3,oddly_breakable_by_hand=3}, + groups = {cracky=3,oddly_breakable_by_hand=3, not_cuttable=1}, }) minetest.register_craft({ @@ -165,8 +72,187 @@ minetest.register_craft({ } }) --- If unifieddyes installed provide a colorizeable variant +--[[ + Glowing Glass Variants + + ]] + +--[[ Rhombus Glow Glass ]] + +minetest.register_node("darkage:glow_glass", { + description = "Medieval Glow Glass", + drawtype = "glasslike", + tiles = {"darkage_glass.png"}, + use_texture_alpha=true, + paramtype = "light", + sunlight_propagates = true, + light_source = default.LIGHT_MAX-3, + groups = {cracky = 3, oddly_breakable_by_hand = 3, not_cuttable=1}, + sounds = default.node_sound_glass_defaults(), + inventory_image = minetest.inventorycube("darkage_glow_glass.png") +}) + +minetest.register_craft({ + output = "darkage:glow_glass 1", + type = "shaped", + recipe = { + {"darkage:glass"}, + {"default:torch"} + } +}) + +-- Recycling +minetest.register_craft({ + output = "darkage:glass 1", + type = "shaped", + recipe = {{"darkage:glow_glass"}}, +}) + +--[[ Round Glow Glass ]] + +minetest.register_node("darkage:glow_glass_round", { + description = "Medieval Round Glow Glass", + drawtype = "glasslike", + tiles = {"darkage_glass_round.png"}, + use_texture_alpha=true, + paramtype = "light", + sunlight_propagates = true, + light_source = default.LIGHT_MAX-3, + groups = {cracky = 3, oddly_breakable_by_hand = 3, not_cuttable=1}, + sounds = default.node_sound_glass_defaults(), + inventory_image = minetest.inventorycube("darkage_glow_glass_round.png") +}) + +minetest.register_craft({ + output = "darkage:glow_glass_round 1", + type = "shaped", + recipe = { + {"darkage:glass_round"}, + {"default:torch"} + } +}) + +-- Recycling +minetest.register_craft({ + output = "darkage:glass_round 1", + recipe = {{"darkage:glow_glass_round"}} +}) + +--]] Square Glow Glass ]] + +minetest.register_node("darkage:glow_glass_square", { + description = "Medieval Square Glow Glass", + drawtype = "glasslike", + tiles = {"darkage_glass_square.png"}, + use_texture_alpha=true, + paramtype = "light", + sunlight_propagates = true, + light_source = default.LIGHT_MAX-3, + groups = {cracky = 3, oddly_breakable_by_hand = 3, not_cuttable=1}, + sounds = default.node_sound_glass_defaults(), + inventory_image = minetest.inventorycube("darkage_glow_glass_square.png") +}) + +minetest.register_craft({ + output = "darkage:glow_glass_square 1", + type = "shaped", + recipe = { + {"darkage:glass_square"}, + {"default:torch"}, + } +}) + +--Recycling +minetest.register_craft({ + output = "darkage:glass_square 1", + recipe = {{"darkage:glow_glass_square"}} +}) + +--[[ + Colorizable Milk Glass Variants, depending on unifieddyes mod + + ]] + if minetest.get_modpath("unifieddyes") then + + --[[ Rhombus Milk Glass ]] + + minetest.register_node("darkage:milk_glass", { + description = "Milky Medieval Glass (Good for colorization)", + drawtype = "glasslike", + tiles = {"darkage_milk_glass.png"}, + use_texture_alpha=true, + paramtype = "light", + paramtype2 = "color", + palette = "unifieddyes_palette_extended.png", + sunlight_propagates = true, + groups = {cracky = 3, oddly_breakable_by_hand = 3, not_cuttable=1, ud_param2_colorable = 1}, + sounds = default.node_sound_glass_defaults() + }) + + minetest.register_craft({ + output = "darkage:milk_glass", + type = "shapeless", + recipe = {"darkage:glass", "dye:white"} + }) + + unifieddyes.register_color_craft({ + output = "darkage:milk_glass", + palette = "extended", + type = "shapeless", + neutral_node = "", + recipe = { + "darkage:milk_glass", + "MAIN_DYE" + } + }) + + -- Recycling + minetest.register_craft({ + output = "darkage:glass 1", + recipe = {{"darkage:milk_glass"}} + }) + + --[[ Round Milk Glass ]] + + minetest.register_node("darkage:milk_glass_round", { + description = "Milky Medieval Round Glass (Good for colorization)", + drawtype = "glasslike", + tiles = {"darkage_milk_glass_round.png"}, + use_texture_alpha=true, + paramtype = "light", + paramtype2 = "color", + palette = "unifieddyes_palette_extended.png", + sunlight_propagates = true, + groups = {cracky = 3, oddly_breakable_by_hand = 3, not_cuttable=1, ud_param2_colorable = 1}, + sounds = default.node_sound_glass_defaults() + }) + -- Craft + minetest.register_craft({ + output = "darkage:milk_glass_round", + type = "shapeless", + recipe = {"darkage:glass_round", "dye:white"}, + }) + + unifieddyes.register_color_craft({ + output = "darkage:milk_glass_round", + palette = "extended", + type = "shapeless", + neutral_node = "", + recipe = { + "darkage:milk_glass_round", + "MAIN_DYE" + } + }) + + -- Recycling + minetest.register_craft({ + output = "darkage:glass_round 1", + recipe = {{"darkage:milk_glass_round"}} + }) + + --[[ Square Milk Glass ]] + minetest.register_node("darkage:milk_glass_square", { description = "Milky Medieval Square Glass (Good for colorization)", drawtype = "glasslike", @@ -174,23 +260,34 @@ if minetest.get_modpath("unifieddyes") then use_texture_alpha=true, paramtype = "light", paramtype2 = "color", - palette = "unifieddyes_palette.png", + palette = "unifieddyes_palette_extended.png", sunlight_propagates = true, groups = {cracky = 3, oddly_breakable_by_hand = 3, not_cuttable=1, ud_param2_colorable = 1}, - sounds = default.node_sound_glass_defaults(), - after_dig_node = unifieddyes.after_dig_node + sounds = default.node_sound_glass_defaults() }) --- Craft + -- Craft minetest.register_craft({ - output = "darkage:milk_glass_square 1", + output = "darkage:milk_glass_square", type = "shapeless", - recipe = {"darkage:glass_square", "dye:white"} + recipe = {"darkage:glass_square", "dye:white"}, }) --- Recycling + unifieddyes.register_color_craft({ + output = "darkage:milk_glass_square", + palette = "extended", + type = "shapeless", + neutral_node = "", + recipe = { + "darkage:stained_milk_glass_square", + "MAIN_DYE" + } + }) + + -- Recycling minetest.register_craft({ - output = "darkage:glass_square 1", + output = "darkage:glass_square", recipe = {{"darkage:milk_glass_square"}} }) -end + +end --unifieddyes condition diff --git a/textures/darkage_glow_glass.png b/textures/darkage_glow_glass.png new file mode 100644 index 0000000000000000000000000000000000000000..b7db5725d10a28d04ee8777efe7afda12e72bc0e GIT binary patch literal 418 zcmV;T0bTxyP)Y_V52(5YgnEgQ_CN2qFSA0|5HIhloH`!ORFDAPwgn3K5yQu0w2VtmF0l z1zSv2QK~9pTZ5W0+d$2TuaECd1^}hKjBSnmaW|KCsIsgnqh?$fGozaI4gi45X}E2; zt2kk~oHA{UWwvbVve$A#2)`1j8KLLvlFc2eyN^vy$_lg5nzGI+BAcwVGw>)x1YOrX zWm9bH$yU44XYYN+h-g_e8~JVS!Tz|*x_vnf8M9siK;^w(Yz&{(tzpAm$&VN_&nNLe zHl_~regC(Oso$w2Jztlf5D^Lh(=)5KSRo=)DkB}+)M6WTySFj_0lXO9?{c;DTmS$7 M07*qoM6N<$f=EiH@&Et; literal 0 HcmV?d00001 diff --git a/textures/darkage_glow_glass_round.png b/textures/darkage_glow_glass_round.png new file mode 100644 index 0000000000000000000000000000000000000000..3923082eea4a0923561e340b6b6dd98c845df19b GIT binary patch literal 499 zcmVYt&0Wn4p5wz9-fU2tCoI?l!T5D{#TlB*igTgt-%lkC| zz+OvKk99_(iyG0(3_G7su)JTx%u0ZWIC{xSDUM$9Xf)#JB}Xq=Yt7M1PMkhZDaAy@ z1rc%6G@8U@?bFF=p_T_s-=6%9V)Qa zekur0?*M?&6=zBSU~;3de%NK$cq;I^Xklh0L_g6q4GyEO>u=a@*LyG-l;rkXNOF&1 zN-1{Eap9cf)oPWE>U=&yRaJOhwAnZTWW0p^TLBSq@s<41#A6>R8Ea-GgtfLy42MJf zC6cjPYd{FW(Mvu&qnGTQ`?W0qTnHgpN|_m^FW=F&Z6tJ002ovPDHLkV1lLK%@hCt literal 0 HcmV?d00001 diff --git a/textures/darkage_glow_glass_square.png b/textures/darkage_glow_glass_square.png new file mode 100644 index 0000000000000000000000000000000000000000..ce5850e164de34d7bfe9b88a3f279184b3a4a752 GIT binary patch literal 347 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)3roRxz+K?@nd}if|Tq zL>4nJa0`PlBg3pY5H=O_Q&kJ{5nE+XU&=g6nf$5;uvCadg)}tE@nd>*ZsYo ziZM$BoV6ww^-pD9a>j7m9p*P1x5dP?I=XT_&e|Bv!*|X=PV~3;UVf+eNs5b3oe>ax zGRM*7!#!q(Ag_!w)%{b1stk>NI2Qh^xi|gLQOAA%}&xIw9D;usK;c+BF7pxq5&7@wATTuLT({{J2%TPwwHg?Bc`TI!hTWaz0hg`>LBEd1L9}ZC;wMqp6276ApN3Z}T?(%;J)