Compare commits

...

32 Commits

Author SHA1 Message Date
Luke aka SwissalpS
e7988d5867
is ground content revision (#12) 2024-03-01 15:15:43 +01:00
Jeremy Anderson
aa9e57ebc3
Merge pull request #10 from sys4-fr/master
Fix deprecated use of use_texture_alpha
2021-03-22 09:26:20 -05:00
aee34845cb Fix deprecated use of use_texture_alpha 2021-03-20 16:23:39 +01:00
ZatroxDE
a68dfa502c Add connected glass textures 2020-08-26 10:29:50 +02:00
David Leal
fc371df620
Use mod.conf for name/dependencies (#8)
Deletes deprecated 'depends.txt'.
2020-06-04 20:37:39 +02:00
Jeremy Anderson
d1b0278c68
Merge pull request #7 from VanessaE/master
use Unified Dyes on_dig where needed
2019-08-06 18:28:30 -05:00
Vanessa Dannenberg
d1cdbbd5bc use Unified Dyes on_dig where needed - requires Unified Dyes commit 9ff40a7f or later 2019-07-18 02:27:51 -04:00
Jeremy Anderson
3d7ab900a0
Merge pull request #6 from VanessaE/master
fix not being able to airbrush [trap] super glow glass
2018-10-30 17:38:02 -05:00
Vanessa Dannenberg
827eb3e484 fix not being able to airbrush [trap] super glow glass 2018-10-25 13:20:23 -04:00
Jeremy Anderson
3c2ca3a606
Merge pull request #5 from VanessaE/master
get rid of old 89->256 color conversion LBM
2018-09-13 12:43:59 -05:00
Vanessa Dannenberg
5abcd8433f get rid of old 89->256 color conversion LBM
(obsolete, can only crash now anyway)
2018-09-12 23:00:48 -04:00
Jeremy Anderson
8fb5fa188e
Merge pull request #4 from VanessaE/master
switch to colored itemstacks
2018-08-26 00:01:26 -05:00
Vanessa Dannenberg
8cb21b1057 switch to colored itemstacks
with full crafting recipes
(requires Unified Dyes commit 2a816534 or later)
2018-08-22 20:52:20 -04:00
Jeremy Anderson
af425a67ea Merge pull request #3 from VanessaE/master
Many changes, please see commit log :P
2017-03-27 14:12:51 -05:00
Vanessa Ezekowitz
2215a44037 don't force param2 = 240 on [trap] super glow glass
(breaks client-side connected glass setting)
2017-03-25 03:28:59 -04:00
Vanessa Ezekowitz
f6b10f4cbe use unified dyes auto-colorization feature 2017-03-18 06:36:57 -04:00
Vanessa Ezekowitz
9f2552a540 replace missing myglow definition 2017-03-18 06:34:51 -04:00
Vanessa Ezekowitz
97c15ce2da use unified dyes on_construct handler
to set 256-color palette meta key on place
2017-03-14 02:16:37 -04:00
Vanessa Ezekowitz
fef736edd6 delete obsolete textures 2017-02-25 02:14:18 -05:00
Vanessa Ezekowitz
1fe7541f7d convert to use UD extended palette 2017-02-25 02:06:26 -05:00
Vanessa Ezekowitz
d980d1ef79 convert to use extended UD palette 2017-02-25 01:34:38 -05:00
Vanessa Ezekowitz
e78c0a8b15 don't run LBM at every load 2017-02-16 17:01:39 -05:00
Vanessa Ezekowitz
6e1d104ffe fix wrong not-in-creative-inv redefinition on trap super glow glass 2017-02-06 05:30:13 -05:00
Vanessa Ezekowitz
7a9868bd63 fix wrong "walkable" on stained and faint trap glass 2017-02-06 05:28:43 -05:00
Vanessa Ezekowitz
44e9c4ea32 update unified dyes API for one more node 2017-02-04 21:03:06 -05:00
Vanessa Ezekowitz
efd1200648 unified dyes uses on_use now, instead of on_rightclick 2017-02-04 19:42:03 -05:00
Vanessa Ezekowitz
664681b2e2 better way to call after_dig_node 2017-01-28 09:46:25 -05:00
Vanessa Ezekowitz
bae9f7bd34 set the full color spec in the metadata
during LBM conversion, not just the hue

Also, updated to use the revised UD API
2017-01-28 08:05:12 -05:00
Vanessa Ezekowitz
99eee07f0a fix drops 2017-01-28 07:40:46 -05:00
Vanessa Ezekowitz
94bbecfd3b Reworked to use engine param2 colorization
Uses the place-then-paint method to make colors. To get a regular color,
place some Moreblocks super glow glass, then right click on it with some
dye to color it.  To get the pastel colors, right-click the colored
glass with Moreblocks' "sweeper" to "brush off" some of the color.  Do
it again to change pastel to faint.

Right click a pastel or faint with some dye to re-color it.  You have to
dig and re-place if you want to go darker/more saturated again.
2017-01-25 16:15:27 -05:00
Jeremy Anderson
b6daeecd13 Merge pull request #2 from cmdskp/patch-1
Undeclared oldname to local
2015-12-14 07:29:23 -06:00
cmdskp
5644b08229 Undeclared oldname to local
Removes error reported by minetest regarding undefined global.
2015-12-13 20:01:33 +00:00
114 changed files with 150 additions and 81 deletions

View File

@ -1,3 +0,0 @@
default
moreblocks
unifieddyes

16
geany_run_script.sh Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
rm $0
lua "init.lua"
echo "
------------------
(program exited with code: $?)"
echo "Press return to continue"
#to be more compatible with shells like dash
dummy_var=""
read dummy_var

210
init.lua
View File

@ -17,6 +17,7 @@ Email: doyousketch2 @ yahoo.com
Unified Dyes was released under GNU-GPL 2.0, see LICENSE for info.
More Blocks was released under zlib/libpng for code and CC BY-SA 3.0 Unported for textures, see LICENSE.txt for info.
Additional changes by VanessaEzekowitz in July 2013 to take all items
out of creative inventory.
@ -25,78 +26,112 @@ changes, and to resurrect the craft recipes. Still GPL'd as far as I'm concerned
August 2013 -- rewritten a bit by VanessaEzekowitz to further condense the code.
==============================================================================
January 2017 -- rewritten a bit more by Vanessa E. to use engine param2 colorization
and place-then-paint creation of colors. To get the pastel colors,
place super glow glass, right-click with dye to color it, then right-
click with Moreblocks' "sweeper" to "brush off" some of the color. Do
it again to change pastel to faint. Right click a pastel or faint with
some dye to re-color it (you have to dig and re-place if you want to
darken it). Crafting is no longer used to create the colors.
Recipe for standard colors:
dye
super glow glass
super glow glass
super glow glass
Recipe for pastel colors:
light dye
white paint
super glow glass
super glow glass
super glow glass
Recipe for faint colors:
light dye
white paint
white paint
super glow glass
super glow glass
super glow glass
recipe for low-glow-stained-glass:
as above, but substitute 'glow glass' for super glow glass.
recipe for no-glow-stained-glass:
as regular stained glass, but substitute plain 'glass' for super glow glass
All recipes produce three stained glass blocks.
August 2018 -- altered to use proper colored itemstacks with crafting
==============================================================================
]]--
function makenode(arg)
stainedglass = {}
stainedglass.old_static_nodes = {}
local myglow = LIGHT_MAX-3
minetest.register_node("stained_glass:stained_glass", {
description = "Stained Glass",
drawtype = "glasslike_framed_optional",
tiles = { "stained_glass.png", "stained_glass_detail.png" },
paramtype = "light",
paramtype2 = "color",
palette = "unifieddyes_palette_extended.png",
sunlight_propagates = true,
use_texture_alpha = "blend",
light_source = myglow,
is_ground_content = false,
walkable = true,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1, ud_param2_colorable = 1},
sounds = default.node_sound_glass_defaults(),
on_construct = unifieddyes.on_construct,
on_dig = unifieddyes.on_dig,
})
minetest.override_item("moreblocks:super_glow_glass", {
palette = "unifieddyes_palette_extended.png",
airbrush_replacement_node = "stained_glass:stained_glass",
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3, ud_param2_colorable = 1},
})
-- trap glass
minetest.register_node("stained_glass:stained_trap_glass", {
description = "Stained Trap-glass",
drawtype = "glasslike_framed_optional",
tiles = { "stained_glass.png", "stained_glass_detail.png" },
paramtype = "light",
paramtype2 = "color",
palette = "unifieddyes_palette_extended.png",
sunlight_propagates = true,
use_texture_alpha = "blend",
light_source = myglow,
is_ground_content = false,
walkable = false,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1, ud_param2_colorable = 1},
sounds = default.node_sound_glass_defaults(),
on_construct = unifieddyes.on_construct,
on_dig = unifieddyes.on_dig,
})
minetest.override_item("moreblocks:trap_super_glow_glass", {
palette = "unifieddyes_palette_extended.png",
airbrush_replacement_node = "stained_glass:stained_trap_glass",
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1},
})
-- crafting
unifieddyes.register_color_craft({
output = "stained_glass:stained_glass",
palette = "extended",
type = "shapeless",
neutral_node = "moreblocks:super_glow_glass",
recipe = {
"NEUTRAL_NODE",
"MAIN_DYE"
}
})
unifieddyes.register_color_craft({
output = "stained_glass:stained_trap_glass",
palette = "extended",
type = "shapeless",
neutral_node = "moreblocks:trap_super_glow_glass",
recipe = {
"NEUTRAL_NODE",
"MAIN_DYE"
}
})
-- old static stuff
function stainedglass.makenode(arg)
local name=arg.blockname
local myglow=arg.glow
local myprefix=arg.prefix
local imagename=arg.imagename
local safe=arg.walkflag
local Description
local function tchelper(first, rest)
return first:upper()..rest:lower()
end -- from lua-users.org/wiki/StringRecipes
-- above function is used to turn red_violet_s50 to 'Red Violet S50'
local function tchelper(first, rest)
return first:upper()..rest:lower()
end -- from lua-users.org/wiki/StringRecipes
--register item attributes
Description=string.gsub("Stained Glass - " ..myprefix..name, "_", " ")
Description=Description:gsub("(%a)([%w_']*)", tchelper)
minetest.register_node("stained_glass:"..myprefix..name, {
description = Description,
drawtype = "glasslike",
tiles = {"stained_glass_" .. imagename .. ".png"},
paramtype = "light",
sunlight_propagates = true,
use_texture_alpha = true,
light_source = myglow,
is_ground_content = true,
walkable=safe, -- if not safe, this is trapglass
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1},
sounds = default.node_sound_glass_defaults()
})
table.insert(stainedglass.old_static_nodes, "stained_glass:"..name)
end
-- maybe someday, I can cleanly combine these two functions.
@ -148,13 +183,7 @@ function stained_trapglass_define(arg)
myrecipe[6] = "dye:white"
end
minetest.register_craft({
type = "shapeless",
output = "stained_glass:"..myprefix..name.." 3",
recipe = myrecipe,
})
makenode{blockname=name, glow=myglow, prefix=myprefix, imagename=imagename, walkflag=false}
stainedglass.makenode{blockname=name, glow=myglow, prefix=myprefix, imagename=imagename, walkflag=false}
end
end
@ -204,19 +233,13 @@ function stained_glass_define(arg)
myrecipe[6] = "dye:white"
end
minetest.register_craft({
type = "shapeless",
output = "stained_glass:"..myprefix..name.." 3",
recipe = myrecipe,
})
makenode{blockname=name, glow=myglow, prefix=myprefix, imagename=name, walkflag=true}
stainedglass.makenode{blockname=name, glow=myglow, prefix=myprefix, imagename=name, walkflag=true}
if myprefix == "" then
local aliasname
minetest.register_alias( "stained_glass:" .. code, "stained_glass:" .. name)
if string.match(name,"redviolet") then
oldname=name
local oldname=name
aliasname=string.gsub(name, "redviolet","red_violet") -- need to support red_violet existence, too.
minetest.register_alias( "stained_glass:" .. aliasname, "stained_glass:" .. oldname)
end
@ -287,7 +310,6 @@ for i in ipairs(stained_glass_hues) do
recipevalue = "group:dye,unicolor_"..shadename..huename
if (shadename == "" and stained_glass_hues[i][2]) then
-- print(huename .. " is set to true -- substituting dye:huename ")
recipevalue = "dye:"..huename
elseif (shadename=="pastel_" or shadename=="faint_") then
-- force light_dye for pastel and faint colors
@ -351,6 +373,38 @@ for i in ipairs(stained_glass_hues) do
end
end
-- convert in-map static nodes to use param2 coloring
minetest.register_lbm({
name = "stained_glass:convert_glass",
label = "Convert static glass blocks to use param2 color",
run_at_every_load = false,
nodenames = stainedglass.old_static_nodes,
action = function(pos, node)
local name = node.name
name = string.gsub(name, "aqua", "spring")
name = string.gsub(name, "skyblue", "azure")
name = string.gsub(name, "redviolet", "rose")
local n = string.find(name, ":")
local color = string.sub(name, n + 1)
local h,s,v = unifieddyes.get_hsv(name)
if string.find(name, "trap") then
n = string.find(color, "_")
color = string.sub(color, n + 1)
local paletteidx = unifieddyes.getpaletteidx("unifieddyes:"..color, "extended")
minetest.set_node(pos, { name = "stained_glass:stained_trap_glass", param2 = paletteidx })
else
local paletteidx = unifieddyes.getpaletteidx("unifieddyes:"..color, "extended")
minetest.set_node(pos, { name = "stained_glass:stained_glass", param2 = paletteidx })
end
local meta = minetest.get_meta(pos)
meta:set_string("dye", "unifieddyes:"..v..h..s)
meta:set_string("palette", "ext")
end
})
print("[stained_glass] Loaded!")

2
mod.conf Normal file
View File

@ -0,0 +1,2 @@
name = stained_glass
depends = default, moreblocks, unifieddyes

BIN
textures/stained_glass.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Some files were not shown because too many files have changed in this diff Show More