Skip to content

Commit

Permalink
colored cards
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Feb 3, 2025
1 parent 583c734 commit 7fb1389
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 23 deletions.
50 changes: 27 additions & 23 deletions access_cards.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,31 @@ minetest.register_craftitem("scifi_nodes:access_card_1", {
end
})

minetest.register_craftitem("scifi_nodes:access_card_1_colored", {
description = "Access card",
groups = {
ud_param2_colorable = 1,
not_in_creative_inventory = 1
},
inventory_image = "scifi_nodes_access_card_1.png",
palette = "unifieddyes_palette_extended.png",
stack_max = 1,
paramtype2 = "color",
on_use = function(_, player)
end
})
if minetest.get_modpath("unifieddyes") then
-- add colored cards

minetest.register_craftitem("scifi_nodes:access_card_1_colored", {
description = "Access card",
groups = {
ud_param2_colorable = 1,
not_in_creative_inventory = 1
},
inventory_image = "scifi_nodes_access_card_1.png",
palette = "unifieddyes_palette_extended.png",
stack_max = 1,
paramtype2 = "color",
on_use = function(_, player)
end
})

unifieddyes.register_color_craft({
output = "scifi_nodes:access_card_1_colored",
palette = "extended",
neutral_node = "scifi_nodes:access_card_1",
recipe = {
"NEUTRAL_NODE",
"MAIN_DYE"
},
type = "shapeless"
})
unifieddyes.register_color_craft({
output = "scifi_nodes:access_card_1_colored",
palette = "extended",
neutral_node = "scifi_nodes:access_card_1",
recipe = {
"NEUTRAL_NODE",
"MAIN_DYE"
},
type = "shapeless"
})
end
1 change: 1 addition & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ end
dofile(MP.."/plants.lua")
dofile(MP.."/models.lua")
dofile(MP.."/nodes.lua")
dofile(MP.."/access_cards.lua")
dofile(MP.."/doors.lua")
dofile(MP.."/switch.lua")
dofile(MP.."/protected_switch.lua")
Expand Down

0 comments on commit 7fb1389

Please sign in to comment.