Modifie les groupes de génération des trésors

This commit is contained in:
sys4-fr 2019-01-19 15:57:32 +01:00
parent a1c2fae7bf
commit 87694cb154

View File

@ -9,7 +9,7 @@ local function fill_chest(pos, min_pre, max_pre)
inv:set_size("main", 32) inv:set_size("main", 32)
local stacks = {} local stacks = {}
if minetest.get_modpath("treasurer") ~= nil then if minetest.get_modpath("treasurer") ~= nil then
stacks = treasurer.select_random_treasures(8, min_pre, max_pre, {"weapons", "armor"}) stacks = treasurer.select_random_treasures(8, min_pre, max_pre, {"armes", "armures", "outils", "bonus", "carburant", "precieux"})
end -- TODO else if no treasurer end -- TODO else if no treasurer
for s=1,#stacks do for s=1,#stacks do
if not inv:contains_item("main", stacks[s]) then if not inv:contains_item("main", stacks[s]) then
@ -274,7 +274,7 @@ local yp = {x = pos.x, y = pos.y + 3, z = pos.z}
pos.x = pos.x - 2 pos.x = pos.x - 2
minetest.add_node(pos, {name = "default:chest"}) minetest.add_node(pos, {name = "default:chest"})
fill_chest(pos, 0, 3) fill_chest(pos, 1, 4)
else else
return return
@ -843,7 +843,7 @@ local yp = {x = pos.x, y = pos.y + 8, z = pos.z}
pos.z = pos.z +3 pos.z = pos.z +3
minetest.add_node(pos, {name = "default:chest"}) minetest.add_node(pos, {name = "default:chest"})
fill_chest(pos, 7, 10) fill_chest(pos, 1, 10)
else else
return return