Add some filler treasures.
This commit is contained in:
parent
e5395a69ff
commit
163d75ae74
2 changed files with 26 additions and 7 deletions
15
fortress.lua
15
fortress.lua
|
@ -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
|
||||
|
|
18
pyramid.lua
18
pyramid.lua
|
@ -1,7 +1,7 @@
|
|||
local max_depth = 31000
|
||||
|
||||
-- pyramid stone
|
||||
newnode = fun_caves.clone_node("default:sandstone_block")
|
||||
newnode = fun_caves.clone_node("default:sandstone")
|
||||
newnode.description = "Pyramid Stone"
|
||||
newnode.tiles = {'fun_caves_pyramid_stone.png'}
|
||||
newnode.groups.pyramid = 1
|
||||
|
@ -10,6 +10,11 @@ minetest.register_node("fun_caves:pyramid_1", newnode)
|
|||
|
||||
local newnode = fun_caves.clone_node("default:chest")
|
||||
newnode.description = "Treasure Casket"
|
||||
newnode.on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("true", 'true')
|
||||
end
|
||||
|
||||
local chest_formspec =
|
||||
"size[8,9]" ..
|
||||
default.gui_bg ..
|
||||
|
@ -22,16 +27,19 @@ local chest_formspec =
|
|||
"listring[current_player;main]" ..
|
||||
default.get_hotbar_bg(0,4.85)
|
||||
|
||||
local filler = {'default:apple 10', 'default:coal_lump 10', 'default:wood 10'}
|
||||
local filler = {'default:apple 10', 'default:coal_lump 99', 'default:obsidian_shard', 'farming:seed_cotton 99', 'farming:seed_wheat 99', 'default:junglewood 99', 'default:acacia_wood 99', 'default:glass 99', 'default:obsidian_glass 10', 'default:meselamp 5', 'fun_caves:moon_juice 10', 'default:sword_diamond', 'default:axe_diamond', 'default:paper 25', 'default:book 10', 'default:mese_crystal_fragment'}
|
||||
|
||||
local gems = {'fun_caves:moonstone', 'fun_caves:coral_gem', 'fun_caves:garnet', 'fun_caves:aquamarine', 'fun_caves:zoisite'}
|
||||
if minetest.registered_entities['mobs_monster:sand_monster'] then
|
||||
filler[#filler+1] = 'mobs_monster:sand_monster'
|
||||
end
|
||||
|
||||
local gems = {'fun_caves:moonstone', 'fun_caves:coral_gem', 'fun_caves:garnet', 'fun_caves:aquamarine', 'fun_caves:zoisite', 'fun_caves:sky_iron'}
|
||||
|
||||
newnode.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local true_casket = meta:get_string('true')
|
||||
if true_casket ~= 'true' then
|
||||
clicker:set_hp(clicker:get_hp() - 2)
|
||||
--print('* ouch!')
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -40,7 +48,7 @@ newnode.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|||
meta:set_string("formspec", chest_formspec)
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 8*4)
|
||||
for i = 1, math.random(4) do
|
||||
for i = 1, math.random(12) do
|
||||
inv:add_item('main', filler[math.random(#filler)])
|
||||
end
|
||||
inv:add_item('main', gems[math.random(#gems)])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue