1
0
mirror of https://github.com/mt-mods/unifieddyes.git synced 2025-06-28 14:26:21 +02:00

Compare commits

..

5 Commits

Author SHA1 Message Date
10ab87bf65 prevent crash in setting sky color
if get color from name return nil
2019-05-25 04:14:12 -04:00
f59c8affc1 Merge branch 'master' into 'master'
Fixed yield for crafted dyes.

See merge request VanessaE/unifieddyes!2
2019-02-07 15:19:47 +00:00
667bce80b9 Fixed yield for crafted dyes.
Fix a bug that caused multiple inconsistent recipes to appear
(identical dye resources gave different dye output quantity).

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2019-02-07 10:08:04 +01:00
5039a8ce07 Merge branch 'patch-1' into 'master'
Fix numbers relating to greys

See merge request VanessaE/unifieddyes!1
2018-12-16 00:09:21 +00:00
13a8cbb38f Some of the numbers relating to greys are used inconsistently, making three of the palette colours unreachable. This bug patch fixes the numbers and restores full usability of the palette. 2018-12-15 10:53:35 +00:00

View File

@ -128,7 +128,7 @@ unifieddyes.GREYS = {
unifieddyes.GREYS_EXTENDED = table.copy(unifieddyes.GREYS)
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)
end
end
@ -449,7 +449,7 @@ function unifieddyes.getpaletteidx(color, palette_type)
["grey_14"] = 1,
["grey_13"] = 2,
["grey_12"] = 3,
["light_grey"] = 3,
["light_grey"] = 4,
["grey_11"] = 4,
["grey_10"] = 5,
["grey_9"] = 6,
@ -668,10 +668,12 @@ function unifieddyes.on_airbrush(itemstack, player, pointed_thing)
minetest.chat_send_player(player_name, "*** No node selected")
else
local hexcolor = unifieddyes.get_color_from_dye_name(painting_with)
local r = tonumber(string.sub(hexcolor,1,2),16)
local g = tonumber(string.sub(hexcolor,3,4),16)
local b = tonumber(string.sub(hexcolor,5,6),16)
player:set_sky({r=r,g=g,b=b,a=255},"plain")
if hexcolor then
local r = tonumber(string.sub(hexcolor,1,2),16)
local g = tonumber(string.sub(hexcolor,3,4),16)
local b = tonumber(string.sub(hexcolor,5,6),16)
player:set_sky({r=r,g=g,b=b,a=255},"plain")
end
end
return
end
@ -1431,7 +1433,7 @@ for _,i in ipairs(unifieddyes.base_color_crafts) do
minetest.register_craft( {
type = "shapeless",
output = "dye:"..j[1]..color..j[2].." "..yield,
output = "dye:"..j[1]..color..j[2].." "..j[6],
recipe = {
"dye:"..color,
firstdye,