mirror of
https://github.com/mt-mods/unifieddyes.git
synced 2025-07-18 00:00:30 +02:00
Compare commits
2 Commits
ecd05bfd90
...
de6e2e0e35
Author | SHA1 | Date | |
---|---|---|---|
de6e2e0e35 | |||
3e45f316a3 |
4
api.lua
4
api.lua
@ -45,10 +45,11 @@ minetest.register_on_placenode(
|
|||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
-- 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
|
||||||
-- adapted from
|
-- adapted from
|
||||||
-- https://github.com/minetest/minetest/blob/fe8d04d0b3c2e3af7c406fb6527f1b5230a30137/builtin/game/item.lua#L460-L562
|
-- https://github.com/minetest/minetest/blob/fe8d04d0b3c2e3af7c406fb6527f1b5230a30137/builtin/game/item.lua#L460-L562
|
||||||
local function node_dig_without_color(pos, node, digger)
|
local function node_dig_without_color(pos, node, digger)
|
||||||
|
if not digger then return false end
|
||||||
local diggername = digger:get_player_name()
|
local diggername = digger:get_player_name()
|
||||||
|
|
||||||
local def = ItemStack(node.name):get_definition()
|
local def = ItemStack(node.name):get_definition()
|
||||||
@ -197,6 +198,7 @@ function unifieddyes.generate_split_palette_nodes(name, def, drop)
|
|||||||
def2.palette = "unifieddyes_palette_"..color.."s.png"
|
def2.palette = "unifieddyes_palette_"..color.."s.png"
|
||||||
def2.paramtype2 = "colorfacedir"
|
def2.paramtype2 = "colorfacedir"
|
||||||
def2.groups.ud_param2_colorable = 1
|
def2.groups.ud_param2_colorable = 1
|
||||||
|
def2.is_ground_content = false
|
||||||
|
|
||||||
if drop then
|
if drop then
|
||||||
def2.drop = {
|
def2.drop = {
|
||||||
|
Reference in New Issue
Block a user