beta dye mod

This commit is contained in:
wsor 2021-04-06 16:07:10 -04:00
parent 2f1d2820a5
commit b3477bb982
22 changed files with 78 additions and 2 deletions

View File

@ -11,4 +11,6 @@ gneiss
hardware coloring
bricks, 2 glass blocks, 2 glass panes, wool
^[colorize:gray:90
^[colorize:gray:90
mapgen granite, decoblocks refined granite

59
mods/fl_dyes/init.lua Normal file
View File

@ -0,0 +1,59 @@
fl_dyes = {}
fl_dyes.details = {
version = 3,
name = "fl_dyes",
author = "wsor",
license = "MIT",
}
fl_dyes.dyes = {
{"white", "White", "#f3f3f3"},
{"violet", "Violet", "#8821d6"},
{"red", "Red", "#e72e2e"},
{"pink", "Pink", "#f2a9a9"},
{"orange", "Orange", "#eb752b"},
{"magenta", "Magenta", "#ed57b3"},
{"grey", "Grey", "#aaaaaa"},
{"green", "Green", "#79ef2b"},
{"dark_grey", "Dark Grey", "#717171"},
{"dark_green", "Dark Green", "#44b811"},
{"cyan", "Cyan", "#13d4dc"},
{"brown", "Brown", "#8c5510"},
{"blue", "Blue", "#1382dd"},
{"black", "Black", "#4e4e4e"},
{"yellow", "Yellow", "#f3f01f"},
}
minetest.register_node("fl_dyes:demo_node", {
description = "dye test node",
tiles = {"farlands_demo.png"},
paramtype = "light",
paramtype2 = "color",
--sunlight_propagates = true,
palette = "farlands_palette.png",
groups = {oddly_breakable_by_hand = 3},
preserve_metadata = function(pos, oldnode, oldmeta, drops)
drops[1]:get_meta():set_string("description", fl_dyes.dyes[oldnode.param2 + 1][2] .. " test_node")
end,
})
for _, dye in pairs(fl_dyes.dyes) do
minetest.register_craftitem("fl_dyes:" .. dye[1] .. "_dye", {
description = dye[2] .. " dye",
inventory_image = "farlands_" .. dye[1] .. "_dye.png",
})
end
for counter, dye in pairs(fl_dyes.dyes) do
local out_item = ItemStack(minetest.itemstring_with_palette("fl_dyes:demo_node", counter - 1))
out_item:get_meta():set_string("description", fl_dyes.dyes[counter][2] .. " test_node")
minetest.register_craft({
output = out_item:to_string(),
type = "shapeless",
recipe = {
"fl_dyes:demo_node",
"fl_dyes:" .. dye[1] .. "_dye"
},
})
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

View File

@ -0,0 +1,14 @@
#1 white #f3f3f3
#2 violet #8821d6
#3 red #e72e2e
#4 pink #f2a9a9
#5 orange #eb752b
#6 magenta #ed57b3
#7 grey #aaaaaa
#8 green #79ef2b
#9 dark grey #717171
#10 dark green #44b811
#11 cyan #13d4dc
#12 brown #8c5510
#13 blue #1382dd
#14 black #4e4e4e

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

View File

@ -91,4 +91,5 @@ minetest.register_node("fl_storage:wood_chest", {
end
minetest.node_dig(pos, node, digger)
end,
})
})
--bottom 3 rows of chest inv shouldnt be gradiented, needs to be fixed