mirror of
https://github.com/minetest-mods/maptools.git
synced 2025-09-18 07:25:21 +02:00
Enable or disable crafting recipes for coins
This commit is contained in:
@@ -27,3 +27,5 @@ end
|
|||||||
|
|
||||||
-- Show Map Tools stuff in creative inventory (1 or 0):
|
-- Show Map Tools stuff in creative inventory (1 or 0):
|
||||||
setting("integer", "hide_from_creative_inventory", 1)
|
setting("integer", "hide_from_creative_inventory", 1)
|
||||||
|
-- Enable crafting recipes for coins (true or false)
|
||||||
|
setting("bool", "enable_coin_crafting", false)
|
@@ -16,12 +16,16 @@ minetest.register_craftitem("maptools:copper_coin", {
|
|||||||
stack_max = 10000,
|
stack_max = 10000,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if maptools.config and maptools.config.enable_coin_crafting then
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "maptools:copper_coin 10",
|
output = "maptools:copper_coin 10",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = { "default:copper_ingot", "default:copper_ingot" }
|
recipe = { "default:copper_ingot", "default:copper_ingot" }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_craftitem("maptools:silver_coin", {
|
minetest.register_craftitem("maptools:silver_coin", {
|
||||||
description = S("Silver Coin"),
|
description = S("Silver Coin"),
|
||||||
inventory_image = "maptools_silver_coin.png",
|
inventory_image = "maptools_silver_coin.png",
|
||||||
@@ -29,6 +33,8 @@ minetest.register_craftitem("maptools:silver_coin", {
|
|||||||
stack_max = 10000,
|
stack_max = 10000,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if maptools.config and maptools.config.enable_coin_crafting then
|
||||||
|
|
||||||
if minetest.get_modpath("moreores") then
|
if minetest.get_modpath("moreores") then
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "maptools:silver_coin 10",
|
output = "maptools:silver_coin 10",
|
||||||
@@ -37,6 +43,8 @@ if minetest.get_modpath("moreores") then
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_craftitem("maptools:gold_coin", {
|
minetest.register_craftitem("maptools:gold_coin", {
|
||||||
description = S("Gold Coin"),
|
description = S("Gold Coin"),
|
||||||
inventory_image = "maptools_gold_coin.png",
|
inventory_image = "maptools_gold_coin.png",
|
||||||
@@ -44,12 +52,16 @@ minetest.register_craftitem("maptools:gold_coin", {
|
|||||||
stack_max = 10000,
|
stack_max = 10000,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if maptools.config and maptools.config.enable_coin_crafting then
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "maptools:gold_coin 10",
|
output = "maptools:gold_coin 10",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = { "default:gold_ingot", "default:gold_ingot" }
|
recipe = { "default:gold_ingot", "default:gold_ingot" }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_craftitem("maptools:infinitefuel", {
|
minetest.register_craftitem("maptools:infinitefuel", {
|
||||||
description = S("Infinite Fuel"),
|
description = S("Infinite Fuel"),
|
||||||
inventory_image = "maptools_infinitefuel.png",
|
inventory_image = "maptools_infinitefuel.png",
|
||||||
|
3
settingtypes.txt
Normal file
3
settingtypes.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# If true enables coin crafting recipes. If false or omitted, disables coin crafting recipes
|
||||||
|
# Takes effect only during loadtime.
|
||||||
|
maptools.enable_coin_crafting (Enable crafting recipes for coins) bool false
|
Reference in New Issue
Block a user