1
0
mirror of https://github.com/mt-mods/unifieddyes.git synced 2024-10-31 23:30:31 +01:00

fix a couple more missing aliases

This commit is contained in:
Vanessa Ezekowitz 2017-01-28 09:36:42 -05:00
parent 2fcae9d17d
commit e146c55ca0

View File

@ -247,8 +247,9 @@ function unifieddyes.on_rightclick(pos, node, player, stack, pointed_thing, newn
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local prevdye = meta:get_string("dye") local prevdye = meta:get_string("dye")
if not creative_mode and minetest.registered_items[prevdye] then
local inv = player:get_inventory() local inv = player:get_inventory()
if not (inv:contains_item("main", prevdye) and creative_mode) and minetest.registered_items[prevdye] then
if inv:room_for_item("main", prevdye) then if inv:room_for_item("main", prevdye) then
inv:add_item("main", prevdye) inv:add_item("main", prevdye)
else else
@ -312,7 +313,7 @@ function unifieddyes.on_rightclick(pos, node, player, stack, pointed_thing, newn
end end
end end
newnode.param2 = paletteidx + (minetest.get_node(pos).param2 % 32) newnode.param2 = paletteidx + (minetest.get_node(pos).param2 % 32)
minetest.set_node(pos, newnode) minetest.swap_node(pos, newnode)
end end
else -- here is where a node is just being placed, not something being colored else -- here is where a node is just being placed, not something being colored
if unifieddyes.is_buildable_to(player:get_player_name(), pos2) and if unifieddyes.is_buildable_to(player:get_player_name(), pos2) and
@ -630,8 +631,10 @@ minetest.register_alias("unifieddyes:light_red", "dye:pink")
minetest.register_alias("unifieddyes:dark_green", "dye:dark_green") minetest.register_alias("unifieddyes:dark_green", "dye:dark_green")
minetest.register_alias("unifieddyes:black", "dye:black") minetest.register_alias("unifieddyes:black", "dye:black")
minetest.register_alias("unifieddyes:darkgrey", "dye:dark_grey") minetest.register_alias("unifieddyes:darkgrey", "dye:dark_grey")
minetest.register_alias("unifieddyes:dark_grey", "dye:dark_grey")
minetest.register_alias("unifieddyes:grey", "dye:grey") minetest.register_alias("unifieddyes:grey", "dye:grey")
minetest.register_alias("unifieddyes:lightgrey", "dye:light_grey") minetest.register_alias("unifieddyes:lightgrey", "dye:light_grey")
minetest.register_alias("unifieddyes:light_grey", "dye:light_grey")
minetest.register_alias("unifieddyes:white", "dye:white") minetest.register_alias("unifieddyes:white", "dye:white")
minetest.register_alias("unifieddyes:white_paint", "dye:white") minetest.register_alias("unifieddyes:white_paint", "dye:white")