infer the overlay image

This commit is contained in:
Tai @ Flex 2016-08-25 17:20:07 +01:00
parent c80bbdec20
commit 8cdcc8c050

View File

@ -6,7 +6,8 @@ if minetest.get_modpath("moreores") then
metals = "moreores:tin_ingot" metals = "moreores:tin_ingot"
end end
function anycoin:register_coin(coinname,coindesc,cmaterial,overimg,cvalue) function anycoin:register_coin(coinname,coindesc,cmaterial,cvalue)
local overimg = cmaterial.inventory_image or "default_dirt_with_grass.png"
local coinimg = "anycoin_coin.png^"..overimg local coinimg = "anycoin_coin.png^"..overimg
local value = cvalue local value = cvalue
if not cvalue then if not cvalue then
@ -42,7 +43,7 @@ function anycoin:register_coin(coinname,coindesc,cmaterial,overimg,cvalue)
end end
-- A base coin to serve as an exchange base -- A base coin to serve as an exchange base
anycoin:register_coin("base","AnyCoin",nil,"default_dirt_with_grass.png",1) anycoin:register_coin("base","AnyCoin",nil,1)
local basecoin = "anycoin:coin_base" local basecoin = "anycoin:coin_base"