Add some filler treasures.

This commit is contained in:
Duane 2016-06-29 09:16:43 -05:00
parent e5395a69ff
commit 163d75ae74
2 changed files with 26 additions and 7 deletions

View file

@ -45,7 +45,17 @@ local treasures = {
{'fun_caves:aquamarine', 'fun_caves:garnet', 'fun_caves:zoisite', 'fun_caves:coral_gem', 'fun_caves:moonstone', 'default:obsidian'},
{'fun_caves:aquamarine', 'fun_caves:garnet', 'fun_caves:zoisite', 'fun_caves:coral_gem', 'fun_caves:moonstone', 'default:obsidian'},
}
local filler = {'default:apple 10', 'default:coal_lump 10', 'default:wood 10'}
local filler = {'default:apple 50', 'default:coal_lump 99', 'default:wood 99', 'default:obsidian_shard', 'default:steel_ingot 10', 'default:mese_crystal', 'default:copper_ingot 10', 'default:bronze_ingot 10', 'default:diamond 10', 'fun_caves:silver_ingot 10', 'default:gold_ingot 10', 'fun_caves:moon_glass 25', 'fun_caves:moon_juice 50', 'default:sword_mese', 'default:pick_mese', 'default:sword_diamond', 'default:pick_diamond', 'fun_caves:constant_flame'}
if minetest.registered_entities['mobs_monster:stone_monster'] then
filler[#filler+1] = 'mobs_monster:stone_monster'
end
if minetest.registered_entities['mobs_monster:dungeon_master'] then
filler[#filler+1] = 'mobs_monster:dungeon_master'
end
local trophies = {
{'fun_caves:unobtainium', 'fun_caves:philosophers_stone'},
{'fun_caves:unobtainium', 'fun_caves:philosophers_stone'},
@ -68,6 +78,7 @@ local chest_formspec =
local newnode = fun_caves.clone_node("default:chest")
newnode.description = "Treasure Chest"
newnode.on_construct = nil
newnode.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local meta = minetest.get_meta(pos)
local ready = meta:get_string('formspec')
@ -78,7 +89,7 @@ newnode.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local inv = meta:get_inventory()
inv:set_size("main", 8*4)
inv:add_item('main', big_item)
for i = 1, math.random(4) do
for i = 1, math.random(12) do
inv:add_item('main', filler[math.random(#filler)])
end
if math.random(10) == 1 then