mirror of
https://github.com/mt-mods/unifieddyes.git
synced 2025-06-28 14:26:21 +02:00
Compare commits
5 Commits
2018-12-03
...
2019-05-25
Author | SHA1 | Date | |
---|---|---|---|
10ab87bf65 | |||
f59c8affc1 | |||
667bce80b9 | |||
5039a8ce07 | |||
13a8cbb38f |
8
init.lua
8
init.lua
@ -128,7 +128,7 @@ unifieddyes.GREYS = {
|
|||||||
unifieddyes.GREYS_EXTENDED = table.copy(unifieddyes.GREYS)
|
unifieddyes.GREYS_EXTENDED = table.copy(unifieddyes.GREYS)
|
||||||
|
|
||||||
for i = 1, 14 do
|
for i = 1, 14 do
|
||||||
if i ~= 0 and i ~= 3 and i ~= 7 and i ~= 11 and i ~= 15 then
|
if i ~= 0 and i ~= 4 and i ~= 8 and i ~= 11 and i ~= 15 then
|
||||||
table.insert(unifieddyes.GREYS_EXTENDED, "grey_"..i)
|
table.insert(unifieddyes.GREYS_EXTENDED, "grey_"..i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -449,7 +449,7 @@ function unifieddyes.getpaletteidx(color, palette_type)
|
|||||||
["grey_14"] = 1,
|
["grey_14"] = 1,
|
||||||
["grey_13"] = 2,
|
["grey_13"] = 2,
|
||||||
["grey_12"] = 3,
|
["grey_12"] = 3,
|
||||||
["light_grey"] = 3,
|
["light_grey"] = 4,
|
||||||
["grey_11"] = 4,
|
["grey_11"] = 4,
|
||||||
["grey_10"] = 5,
|
["grey_10"] = 5,
|
||||||
["grey_9"] = 6,
|
["grey_9"] = 6,
|
||||||
@ -668,11 +668,13 @@ function unifieddyes.on_airbrush(itemstack, player, pointed_thing)
|
|||||||
minetest.chat_send_player(player_name, "*** No node selected")
|
minetest.chat_send_player(player_name, "*** No node selected")
|
||||||
else
|
else
|
||||||
local hexcolor = unifieddyes.get_color_from_dye_name(painting_with)
|
local hexcolor = unifieddyes.get_color_from_dye_name(painting_with)
|
||||||
|
if hexcolor then
|
||||||
local r = tonumber(string.sub(hexcolor,1,2),16)
|
local r = tonumber(string.sub(hexcolor,1,2),16)
|
||||||
local g = tonumber(string.sub(hexcolor,3,4),16)
|
local g = tonumber(string.sub(hexcolor,3,4),16)
|
||||||
local b = tonumber(string.sub(hexcolor,5,6),16)
|
local b = tonumber(string.sub(hexcolor,5,6),16)
|
||||||
player:set_sky({r=r,g=g,b=b,a=255},"plain")
|
player:set_sky({r=r,g=g,b=b,a=255},"plain")
|
||||||
end
|
end
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -1431,7 +1433,7 @@ for _,i in ipairs(unifieddyes.base_color_crafts) do
|
|||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = "dye:"..j[1]..color..j[2].." "..yield,
|
output = "dye:"..j[1]..color..j[2].." "..j[6],
|
||||||
recipe = {
|
recipe = {
|
||||||
"dye:"..color,
|
"dye:"..color,
|
||||||
firstdye,
|
firstdye,
|
||||||
|
Reference in New Issue
Block a user