mirror of
https://github.com/adrido/darkage.git
synced 2025-01-09 17:30:19 +01:00
Fixed colorizing, added glow variants (#3)
This commit is contained in:
parent
19f2fa7435
commit
8e7aea0317
315
glass.lua
315
glass.lua
@ -6,6 +6,8 @@
|
|||||||
Special thanks to Semmett9 for the glass textures.
|
Special thanks to Semmett9 for the glass textures.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
--[[ Rhombus Glass ]]
|
||||||
|
|
||||||
minetest.register_node("darkage:glass", {
|
minetest.register_node("darkage:glass", {
|
||||||
description = "Clean Medieval Glass",
|
description = "Clean Medieval Glass",
|
||||||
drawtype = "glasslike",
|
drawtype = "glasslike",
|
||||||
@ -26,71 +28,8 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if minetest.get_modpath("unifieddyes") then
|
--[[ Round Glass By Semmett9 aka Infinatum ]]
|
||||||
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
|
|
||||||
})
|
|
||||||
|
|
||||||
-- 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", {
|
minetest.register_node("darkage:glass_round", {
|
||||||
description = "Round Glass",
|
description = "Round Glass",
|
||||||
drawtype = "glasslike",
|
drawtype = "glasslike",
|
||||||
@ -99,7 +38,7 @@ minetest.register_node("darkage:glass_round", {
|
|||||||
use_texture_alpha = true,
|
use_texture_alpha = true,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
sounds = default.node_sound_glass_defaults(),
|
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({
|
minetest.register_craft({
|
||||||
@ -111,40 +50,8 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- If unifieddyes installed provide a colorizeable variant
|
--[[ Square glass By Semmett9 aka Infinatum ]]
|
||||||
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
|
|
||||||
})
|
|
||||||
|
|
||||||
-- 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", {
|
minetest.register_node("darkage:glass_square", {
|
||||||
description = "Square Glass",
|
description = "Square Glass",
|
||||||
drawtype = "glasslike",
|
drawtype = "glasslike",
|
||||||
@ -153,7 +60,7 @@ minetest.register_node("darkage:glass_square", {
|
|||||||
use_texture_alpha = true,
|
use_texture_alpha = true,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
sounds = default.node_sound_glass_defaults(),
|
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({
|
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
|
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", {
|
minetest.register_node("darkage:milk_glass_square", {
|
||||||
description = "Milky Medieval Square Glass (Good for colorization)",
|
description = "Milky Medieval Square Glass (Good for colorization)",
|
||||||
drawtype = "glasslike",
|
drawtype = "glasslike",
|
||||||
@ -174,23 +260,34 @@ if minetest.get_modpath("unifieddyes") then
|
|||||||
use_texture_alpha=true,
|
use_texture_alpha=true,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "color",
|
paramtype2 = "color",
|
||||||
palette = "unifieddyes_palette.png",
|
palette = "unifieddyes_palette_extended.png",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
groups = {cracky = 3, oddly_breakable_by_hand = 3, not_cuttable=1, ud_param2_colorable = 1},
|
groups = {cracky = 3, oddly_breakable_by_hand = 3, not_cuttable=1, ud_param2_colorable = 1},
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults()
|
||||||
after_dig_node = unifieddyes.after_dig_node
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Craft
|
-- Craft
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "darkage:milk_glass_square 1",
|
output = "darkage:milk_glass_square",
|
||||||
type = "shapeless",
|
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({
|
minetest.register_craft({
|
||||||
output = "darkage:glass_square 1",
|
output = "darkage:glass_square",
|
||||||
recipe = {{"darkage:milk_glass_square"}}
|
recipe = {{"darkage:milk_glass_square"}}
|
||||||
})
|
})
|
||||||
end
|
|
||||||
|
end --unifieddyes condition
|
||||||
|
BIN
textures/darkage_glow_glass.png
Normal file
BIN
textures/darkage_glow_glass.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 418 B |
BIN
textures/darkage_glow_glass_round.png
Normal file
BIN
textures/darkage_glow_glass_round.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 499 B |
BIN
textures/darkage_glow_glass_square.png
Normal file
BIN
textures/darkage_glow_glass_square.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 347 B |
Loading…
Reference in New Issue
Block a user