mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-22 15:00:18 +01:00
Sort loot registration into respective mods (#2602)
This commit is contained in:
parent
34b410319e
commit
8d9aa07752
@ -225,3 +225,16 @@ minetest.register_craft({
|
|||||||
replacements = {{"bucket:bucket_lava", "bucket:bucket_empty"}},
|
replacements = {{"bucket:bucket_lava", "bucket:bucket_empty"}},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Register buckets as dungeon loot
|
||||||
|
if minetest.global_exists("dungeon_loot") then
|
||||||
|
dungeon_loot.register({
|
||||||
|
{name = "bucket:bucket_empty", chance = 0.55},
|
||||||
|
-- water in deserts/ice or above ground, lava otherwise
|
||||||
|
{name = "bucket:bucket_water", chance = 0.45,
|
||||||
|
types = {"sandstone", "desert", "ice"}},
|
||||||
|
{name = "bucket:bucket_water", chance = 0.45, y = {0, 32768},
|
||||||
|
types = {"normal"}},
|
||||||
|
{name = "bucket:bucket_lava", chance = 0.45, y = {-32768, -1},
|
||||||
|
types = {"normal"}},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
name = bucket
|
name = bucket
|
||||||
description = Minetest Game mod: bucket
|
description = Minetest Game mod: bucket
|
||||||
depends = default
|
depends = default
|
||||||
|
optional_depends = dungeon_loot
|
||||||
|
@ -19,3 +19,10 @@ carts.path_distance_max = 3
|
|||||||
dofile(carts.modpath.."/functions.lua")
|
dofile(carts.modpath.."/functions.lua")
|
||||||
dofile(carts.modpath.."/rails.lua")
|
dofile(carts.modpath.."/rails.lua")
|
||||||
dofile(carts.modpath.."/cart_entity.lua")
|
dofile(carts.modpath.."/cart_entity.lua")
|
||||||
|
|
||||||
|
-- Register rails as dungeon loot
|
||||||
|
if minetest.global_exists("dungeon_loot") then
|
||||||
|
dungeon_loot.register({
|
||||||
|
name = "carts:rail", chance = 0.35, count = {1, 6}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
name = carts
|
name = carts
|
||||||
description = Carts (formerly boost_cart)
|
description = Carts (formerly boost_cart)
|
||||||
depends = default, player_api
|
depends = default, player_api
|
||||||
|
optional_depends = dungeon_loot
|
||||||
|
@ -1,26 +1,13 @@
|
|||||||
dungeon_loot.registered_loot = {
|
-- Loot from the `default` mod is registered here,
|
||||||
-- buckets
|
-- with the rest being registered in the respective mods
|
||||||
{name = "bucket:bucket_empty", chance = 0.55},
|
|
||||||
-- water in deserts/ice or above ground, lava otherwise
|
|
||||||
{name = "bucket:bucket_water", chance = 0.45,
|
|
||||||
types = {"sandstone", "desert", "ice"}},
|
|
||||||
{name = "bucket:bucket_water", chance = 0.45, y = {0, 32768},
|
|
||||||
types = {"normal"}},
|
|
||||||
{name = "bucket:bucket_lava", chance = 0.45, y = {-32768, -1},
|
|
||||||
types = {"normal"}},
|
|
||||||
|
|
||||||
|
dungeon_loot.registered_loot = {
|
||||||
-- various items
|
-- various items
|
||||||
{name = "default:stick", chance = 0.6, count = {3, 6}},
|
{name = "default:stick", chance = 0.6, count = {3, 6}},
|
||||||
{name = "default:flint", chance = 0.4, count = {1, 3}},
|
{name = "default:flint", chance = 0.4, count = {1, 3}},
|
||||||
{name = "vessels:glass_fragments", chance = 0.35, count = {1, 4}},
|
|
||||||
{name = "carts:rail", chance = 0.35, count = {1, 6}},
|
|
||||||
|
|
||||||
-- farming / consumable
|
-- farming / consumable
|
||||||
{name = "farming:string", chance = 0.5, count = {1, 8}},
|
|
||||||
{name = "farming:wheat", chance = 0.5, count = {2, 5}},
|
|
||||||
{name = "default:apple", chance = 0.4, count = {1, 4}},
|
{name = "default:apple", chance = 0.4, count = {1, 4}},
|
||||||
{name = "farming:seed_cotton", chance = 0.4, count = {1, 4},
|
|
||||||
types = {"normal"}},
|
|
||||||
{name = "default:cactus", chance = 0.4, count = {1, 4},
|
{name = "default:cactus", chance = 0.4, count = {1, 4},
|
||||||
types = {"sandstone", "desert"}},
|
types = {"sandstone", "desert"}},
|
||||||
|
|
||||||
|
@ -144,3 +144,13 @@ minetest.register_craft({
|
|||||||
recipe = "farming:hoe_wood",
|
recipe = "farming:hoe_wood",
|
||||||
burntime = 5,
|
burntime = 5,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Register farming items as dungeon loot
|
||||||
|
if minetest.global_exists("dungeon_loot") then
|
||||||
|
dungeon_loot.register({
|
||||||
|
{name = "farming:string", chance = 0.5, count = {1, 8}},
|
||||||
|
{name = "farming:wheat", chance = 0.5, count = {2, 5}},
|
||||||
|
{name = "farming:seed_cotton", chance = 0.4, count = {1, 4},
|
||||||
|
types = {"normal"}},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
name = farming
|
name = farming
|
||||||
description = Minetest Game mod: farming
|
description = Minetest Game mod: farming
|
||||||
depends = default, wool, stairs
|
depends = default, wool, stairs
|
||||||
|
optional_depends = dungeon_loot
|
||||||
|
@ -228,3 +228,10 @@ minetest.register_craft({
|
|||||||
recipe = "vessels:shelf",
|
recipe = "vessels:shelf",
|
||||||
burntime = 30,
|
burntime = 30,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Register glass fragments as dungeon loot
|
||||||
|
if minetest.global_exists("dungeon_loot") then
|
||||||
|
dungeon_loot.register({
|
||||||
|
name = "vessels:glass_fragments", chance = 0.35, count = {1, 4}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
name = vessels
|
name = vessels
|
||||||
description = Minetest Game mod: vessels
|
description = Minetest Game mod: vessels
|
||||||
depends = default
|
depends = default
|
||||||
|
optional_depends = dungeon_loot
|
||||||
|
Loading…
Reference in New Issue
Block a user