Compare commits

...

6 Commits

Author SHA1 Message Date
f8441dad81 Merge remote-tracking branch 'upstream/master' 2021-03-12 12:14:32 +01:00
733ce6f46a Fix deprecated call to Minetest settings (#15) 2021-03-04 08:17:30 +01:00
7cf127aa9d Merge branch 'github' 2021-03-03 22:57:00 +01:00
498dadfee6 Fix deprecated call to Minetest settings 2021-03-03 22:56:10 +01:00
07af87559e ajoute conversion monnaie bitchange <-> maptools 2019-12-30 16:44:19 +01:00
98a2dc8572 Refactoring, enable tin by default, remove ore generation (#14)
Remove Ore Generation
Disable Crafting Currency By Default
Make All Currency Smelted From Ore
Enable Tin Smelting By Default
2019-01-02 23:56:46 +01:00
6 changed files with 67 additions and 123 deletions

View File

@ -10,18 +10,17 @@ bitchange.enable_warehouse = false
bitchange.enable_toolrepair = true bitchange.enable_toolrepair = true
bitchange.enable_donationbox = true bitchange.enable_donationbox = true
-- Enable/Disable Converting Currency Via Crafting
bitchange.craft_convert_currency = false
-- Converting other ores to MineCoins -- Converting other ores to MineCoins
-- Tin default -- Tin default
-- Zinc technic_worldgen -- Zinc technic_worldgen
-- Quartz quartz -- Quartz quartz
bitchange.use_technic_zinc = false bitchange.use_technic_zinc = false
bitchange.use_quartz = false bitchange.use_quartz = false
bitchange.use_default_tin = false bitchange.use_default_tin = true
-- Pipeworks support -- Pipeworks support
bitchange.exchangeshop_pipeworks = false bitchange.exchangeshop_pipeworks = false
bitchange.warehouse_pipeworks = false bitchange.warehouse_pipeworks = false
-- Advanced generation settings
-- Change in 'minecoins.lua', starting at line 101
bitchange.enable_generation = false

View File

@ -3,3 +3,4 @@ pipeworks?
quartz? quartz?
technic_worldgen? technic_worldgen?
wrench? wrench?
maptools?

View File

@ -38,7 +38,7 @@ if bitchange.enable_donationbox then
dofile(bitchange.mod_path.."/donationbox.lua") dofile(bitchange.mod_path.."/donationbox.lua")
end end
if not minetest.setting_getbool("creative_mode") and bitchange.initial_give > 0 then if not minetest.settings:get_bool("creative_mode") and bitchange.initial_give > 0 then
-- Giving initial money -- Giving initial money
minetest.register_on_newplayer(function(player) minetest.register_on_newplayer(function(player)
player:get_inventory():add_item("main", "bitchange:mineninth "..bitchange.initial_give) player:get_inventory():add_item("main", "bitchange:mineninth "..bitchange.initial_give)

View File

@ -1,34 +1,4 @@
-- Node definitions -- Node definitions
minetest.register_node("bitchange:minecoin_in_ground", {
description = "you hacker!",
tiles = { "default_stone.png^bitchange_minecoin_in_ground.png" },
is_ground_content = true,
groups = {cracky=2, not_in_creative_inventory=1},
sounds = default.node_sound_stone_defaults(),
drop = {
max_items = 2,
items = {
{items = {"bitchange:minecoin"}, rarity = 2 },
{items = {"bitchange:minecoin 3"} }
}
},
})
minetest.register_node("bitchange:mineninth_in_ground", {
description = "you hacker!",
tiles = { "default_stone.png^bitchange_mineninth_in_ground.png" },
is_ground_content = true,
groups = {cracky=3, not_in_creative_inventory=1},
sounds = default.node_sound_stone_defaults(),
drop = {
max_items = 3,
items = {
{items = {"bitchange:mineninth 4"}, rarity = 3 },
{items = {"bitchange:mineninth 6"} }
}
},
})
minetest.register_node("bitchange:minecoinblock", { minetest.register_node("bitchange:minecoinblock", {
description = "MineCoin Block", description = "MineCoin Block",
tiles = { "bitchange_minecoinblock.png" }, tiles = { "bitchange_minecoinblock.png" },
@ -49,40 +19,57 @@ minetest.register_craftitem("bitchange:mineninth", {
stack_max = 30000, stack_max = 30000,
}) })
minetest.register_alias("bitchange:coinbase", "bitchange:mineninth")
-- Crafting -- Crafting
minetest.register_craft({ if bitchange.craft_convert_currency and minetest.get_modpath("maptools") then
output = "bitchange:minecoinblock", minetest.register_craft(
recipe = { {
{"bitchange:minecoin", "bitchange:minecoin", "bitchange:minecoin"}, output = "bitchange:mineninth",
{"bitchange:minecoin", "bitchange:minecoin", "bitchange:minecoin"}, recipe = {
{"bitchange:minecoin", "bitchange:minecoin", "bitchange:minecoin"}, {"maptools:gold_coin", "maptools:gold_coin", "maptools:gold_coin"},
} {"maptools:gold_coin", "maptools:gold_coin", "maptools:gold_coin"},
}) {"maptools:gold_coin", "maptools:gold_coin", "maptools:gold_coin"},
}
})
minetest.register_craft({ minetest.register_craft(
output = "bitchange:minecoin 9", {
recipe = { output = "maptools:gold_coin 9",
{"bitchange:minecoinblock"}, recipe = {{"bitchange:mineninth"}}
} })
})
minetest.register_craft({ minetest.register_craft(
output = "bitchange:minecoin", {
recipe = { output = "maptools:gold_coin",
{"bitchange:mineninth", "bitchange:mineninth", "bitchange:mineninth"}, recipe = {
{"bitchange:mineninth", "bitchange:mineninth", "bitchange:mineninth"}, {"maptools:silver_coin", "maptools:silver_coin", "maptools:silver_coin"},
{"bitchange:mineninth", "bitchange:mineninth", "bitchange:mineninth"}, {"maptools:silver_coin", "maptools:silver_coin", "maptools:silver_coin"},
} {"maptools:silver_coin", "maptools:silver_coin", "maptools:silver_coin"},
}) }
})
minetest.register_craft({ minetest.register_craft(
output = "bitchange:mineninth 9", {
recipe = { output = "maptools:silver_coin 9",
{"bitchange:minecoin"}, recipe = {{"maptools:gold_coin"}}
} })
})
minetest.register_craft(
{
output = "maptools:silver_coin",
recipe = {
{"maptools:copper_coin", "maptools:copper_coin", "maptools:copper_coin"},
{"maptools:copper_coin", "maptools:copper_coin", "maptools:copper_coin"},
{"maptools:copper_coin", "maptools:copper_coin", "maptools:copper_coin"},
}
})
minetest.register_craft(
{
output = "maptools:copper_coin 9",
recipe = {{"maptools:silver_coin"}}
})
end
-- Cooking -- Cooking
minetest.register_craft({ minetest.register_craft({
@ -97,38 +84,13 @@ minetest.register_craft({
output = "default:gold_ingot 4", output = "default:gold_ingot 4",
}) })
-- Generation -- Legacy
if bitchange.enable_generation then if bitchange.enable_generation then
minetest.register_ore({ minetest.log("warning", "[bitchange] Ores will not be generated any more. Remove the setting " ..
ore_type = "scatter", "'enable_generation' from your bitchange configuration to suppress this warning.")
ore = "bitchange:minecoin_in_ground",
wherein = "default:stone",
clust_scarcity = 15*15*15,
clust_num_ores = 3,
clust_size = 7,
y_max = -512,
y_min = -18000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "bitchange:mineninth_in_ground",
wherein = "default:stone",
clust_scarcity = 12*12*12,
clust_num_ores = 5,
clust_size = 8,
y_max = -256,
y_min = -511,
})
minetest.register_ore({
ore_type = "scatter",
ore = "bitchange:mineninth_in_ground",
wherein = "default:stone",
clust_scarcity = 13*13*13,
clust_num_ores = 3,
clust_size = 7,
y_max = 28000,
y_min = -255,
})
end end
minetest.register_alias("bitchange:minecoin_in_ground", "default:stone_with_gold")
minetest.register_alias("bitchange:mineninth_in_ground", "default:stone_with_tin")
minetest.register_alias("bitchange:coinbase", "bitchange:mineninth")

View File

@ -171,7 +171,7 @@ minetest.register_craft({
output = 'bitchange:moneychanger', output = 'bitchange:moneychanger',
recipe = { recipe = {
{'default:stone', 'bitchange:mineninth', 'default:stone'}, {'default:stone', 'bitchange:mineninth', 'default:stone'},
{'default:steel_ingot', 'bitchange:minecoin', 'default:steel_ingot'}, {'default:steel_ingot', 'bitchange:minecoinblock', 'default:steel_ingot'},
{'default:stone', 'default:stone', 'default:stone'} {'default:stone', 'default:stone', 'default:stone'}
} }
}) })

View File

@ -2,24 +2,9 @@
if bitchange.use_technic_zinc and minetest.get_modpath("technic_worldgen") then if bitchange.use_technic_zinc and minetest.get_modpath("technic_worldgen") then
minetest.register_craft({ minetest.register_craft({
type = "cooking",
output = "bitchange:mineninth 8", output = "bitchange:mineninth 8",
recipe = { recipe = "technic:zinc_block",
{"technic:zinc_block", "default:pick_diamond"},
{"technic:zinc_block", ""}
},
replacements = { {"default:pick_diamond", "default:pick_diamond"} }
})
end
if bitchange.use_quartz and minetest.get_modpath("quartz") then
minetest.register_craft({
output = "bitchange:mineninth",
recipe = {
{"quartz:quartz_crystal", "default:pick_diamond"},
{"quartz:quartz_crystal", "quartz:quartz_crystal"},
{"quartz:quartz_crystal", "quartz:quartz_crystal"}
},
replacements = { {"default:pick_diamond", "default:pick_diamond"} }
}) })
end end
@ -30,11 +15,8 @@ end
if bitchange.use_default_tin then if bitchange.use_default_tin then
minetest.register_craft({ minetest.register_craft({
type = "cooking",
output = "bitchange:mineninth 18", output = "bitchange:mineninth 18",
recipe = { recipe = "default:tinblock"
{"default:tinblock", "default:pick_diamond"},
{"default:tinblock", ""}
},
replacements = { {"default:pick_diamond", "default:pick_diamond"} }
}) })
end end