working colored cards

master
Thomas Rudin 2019-10-13 21:45:41 +02:00
commit 534a7da5e8
5 changed files with 53 additions and 0 deletions

17
.luacheckrc Normal file
View File

@ -0,0 +1,17 @@
globals = {
"access_cards"
}
read_globals = {
-- Stdlib
string = {fields = {"split"}},
table = {fields = {"copy", "getn"}},
-- Minetest
"minetest",
"vector", "ItemStack",
"dump", "VoxelArea",
"unifieddyes"
}

12
.travis.yml Normal file
View File

@ -0,0 +1,12 @@
language: generic
sudo: false
addons:
apt:
packages:
- luarocks
before_install:
- luarocks install --local luacheck
script:
- $HOME/.luarocks/bin/luacheck --no-color .
notifications:
email: false

22
init.lua Normal file
View File

@ -0,0 +1,22 @@
minetest.register_craftitem("access_cards:access_card_1", {
description = "Access card",
inventory_image = "access_card_1.png"
})
minetest.register_craftitem("access_cards:access_card_1_colored", {
description = "Access card",
groups = {ud_param2_colorable = 1, not_in_creative_inventory = 1},
inventory_image = "access_card_1.png",
palette = "unifieddyes_palette_extended.png",
paramtype2 = "color",
})
unifieddyes.register_color_craft({
output = "access_cards:access_card_1_colored",
palette = "extended",
neutral_node = "access_cards:access_card_1",
recipe = { "NEUTRAL_NODE", "MAIN_DYE" },
type = "shapeless"
})

2
mod.conf Normal file
View File

@ -0,0 +1,2 @@
name = access_cards
depends = unifieddyes

BIN
textures/access_card_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB