mirror of
https://github.com/mt-mods/unifieddyes.git
synced 2025-07-15 23:00:34 +02:00
Compare commits
4 Commits
20200603-1
...
30c55bec6d
Author | SHA1 | Date | |
---|---|---|---|
30c55bec6d | |||
e2c35e6694 | |||
c91c68e0f5 | |||
09f95729c5 |
7
init.lua
7
init.lua
@ -193,7 +193,7 @@ minetest.register_on_placenode(
|
|||||||
-- The complementary function: strip-off the color if the node being dug is still white/neutral
|
-- The complementary function: strip-off the color if the node being dug is still white/neutral
|
||||||
|
|
||||||
local function move_item(item, pos, inv, digger)
|
local function move_item(item, pos, inv, digger)
|
||||||
if not digger then return end
|
if not (digger and digger:is_player()) then return end
|
||||||
local creative = creative_mode or minetest.check_player_privs(digger, "creative")
|
local creative = creative_mode or minetest.check_player_privs(digger, "creative")
|
||||||
if inv:room_for_item("main", item)
|
if inv:room_for_item("main", item)
|
||||||
and (not creative or not inv:contains_item("main", item, true)) then
|
and (not creative or not inv:contains_item("main", item, true)) then
|
||||||
@ -1147,10 +1147,11 @@ minetest.register_tool("unifieddyes:airbrush", {
|
|||||||
|
|
||||||
unifieddyes.player_last_right_clicked[player_name] = {pos = pos, node = node, def = def}
|
unifieddyes.player_last_right_clicked[player_name] = {pos = pos, node = node, def = def}
|
||||||
|
|
||||||
if not keys.sneak then
|
if (not keys.sneak) and def.on_rightclick then
|
||||||
|
return def.on_rightclick(pos, node, placer, itemstack, pointed_thing)
|
||||||
|
elseif not keys.sneak then
|
||||||
unifieddyes.show_airbrush_form(placer)
|
unifieddyes.show_airbrush_form(placer)
|
||||||
elseif keys.sneak then
|
elseif keys.sneak then
|
||||||
|
|
||||||
if not pos or not def then return end
|
if not pos or not def then return end
|
||||||
local newcolor = unifieddyes.color_to_name(node.param2, def)
|
local newcolor = unifieddyes.color_to_name(node.param2, def)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user