add coins
tin, copper, steel, bronze, and gold
This commit is contained in:
parent
4c36f55195
commit
f827c0cd6d
24
mods/currency/coins.lua
Normal file
24
mods/currency/coins.lua
Normal 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")
|
@ -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")
|
||||
|
BIN
mods/currency/textures/coin.png
Normal file
BIN
mods/currency/textures/coin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
BIN
mods/currency/textures/coin_bronze.png
Normal file
BIN
mods/currency/textures/coin_bronze.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
BIN
mods/currency/textures/coin_copper.png
Normal file
BIN
mods/currency/textures/coin_copper.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
BIN
mods/currency/textures/coin_gold.png
Normal file
BIN
mods/currency/textures/coin_gold.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
BIN
mods/currency/textures/coin_steel.png
Normal file
BIN
mods/currency/textures/coin_steel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
BIN
mods/currency/textures/coin_tin.png
Normal file
BIN
mods/currency/textures/coin_tin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
Loading…
x
Reference in New Issue
Block a user