add coins

tin, copper, steel, bronze, and gold
This commit is contained in:
Elkien3 2018-06-27 15:52:54 -05:00
parent 4c36f55195
commit f827c0cd6d
8 changed files with 26 additions and 0 deletions

24
mods/currency/coins.lua Normal file
View File

@ -0,0 +1,24 @@
local function makecoin(name, itemstring, texture, ingot)
minetest.register_craftitem(itemstring, {
description = name,
inventory_image = texture,
groups = {coin = 1}
})
minetest.register_craft({
type = "shapeless",
output = itemstring.." 9",
recipe = {ingot},
})
minetest.register_craft({
type = "shapeless",
output = ingot,
recipe = {itemstring, itemstring, itemstring, itemstring, itemstring, itemstring, itemstring, itemstring, itemstring},
})
end
makecoin("Tin Coin", "currency:coin_tin", "coin_tin.png", "default:tin_ingot")
makecoin("Copper Coin", "currency:coin_copper", "coin_copper.png", "default:copper_ingot")
makecoin("Steel Coin", "currency:coin_steel", "coin_steel.png", "default:steel_ingot")
makecoin("Bronze Coin", "currency:coin_bronze", "coin_bronze.png", "default:bronze_ingot")
makecoin("Gold Coin", "currency:coin_gold", "coin_gold.png", "default:gold_ingot")

View File

@ -3,6 +3,8 @@ local modpath = minetest.get_modpath("currency")
--dofile(modpath.."/craftitems.lua")
--minetest.log("info", "[Currency] Craft_items Loaded!")
dofile(modpath.."/coins.lua")
minetest.log("info", "[Currency] Coins Loaded!")
dofile(modpath.."/shop.lua")
minetest.log("info", "[Currency] Shop Loaded!")
--dofile(modpath.."/barter.lua")

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB