Add aquamarine tesserect.

This commit is contained in:
Duane 2016-06-09 07:42:17 -05:00
parent a6497392bd
commit 8912eb85cd
10 changed files with 101 additions and 2 deletions

View file

@ -80,7 +80,7 @@ minetest.register_node("fun_caves:glowing_fungal_stone", {
}) })
-- Glowing fungus grows underground. -- Glowing fungus grows underground.
minetest.register_node("fun_caves:glowing_fungus", { minetest.register_craftitem("fun_caves:glowing_fungus", {
description = "Glowing Fungus", description = "Glowing Fungus",
drawtype = "plantlike", drawtype = "plantlike",
paramtype = "light", paramtype = "light",
@ -111,7 +111,7 @@ newnode.light_source = default.LIGHT_MAX
minetest.register_node("fun_caves:moon_glass", newnode) minetest.register_node("fun_caves:moon_glass", newnode)
-- Moon juice is extracted from glowing fungus, to make glowing materials. -- Moon juice is extracted from glowing fungus, to make glowing materials.
minetest.register_node("fun_caves:moon_juice", { minetest.register_craftitem("fun_caves:moon_juice", {
description = "Moon Juice", description = "Moon Juice",
drawtype = "plantlike", drawtype = "plantlike",
paramtype = "light", paramtype = "light",

View file

@ -3,10 +3,20 @@ fun_caves.version = "1.0"
fun_caves.time_factor = 10 fun_caves.time_factor = 10
fun_caves.light_max = 8 fun_caves.light_max = 8
fun_caves.path = minetest.get_modpath(minetest.get_current_modname()) fun_caves.path = minetest.get_modpath(minetest.get_current_modname())
fun_caves.world = minetest.get_worldpath()
fun_caves.DEBUG = false fun_caves.DEBUG = false
local inp = io.open(fun_caves.world..'/fun_caves_data.txt','r')
if inp then
local d = inp:read('*a')
fun_caves.db = minetest.deserialize(d)
else
fun_caves.db = {}
end
minetest.register_on_mapgen_init(function(mgparams) minetest.register_on_mapgen_init(function(mgparams)
minetest.set_mapgen_params({flags="nocaves,nodungeons"}) minetest.set_mapgen_params({flags="nocaves,nodungeons"})
end) end)

View file

@ -112,3 +112,91 @@ minetest.register_node("fun_caves:water_poison_flowing", newnode)
-- light_source = LIGHT_MAX, -- light_source = LIGHT_MAX,
-- pointable = false, -- pointable = false,
--}) --})
local function teleporter(user, area, power)
if not user then
return
end
local name = user:get_player_name()
local pos = user:getpos()
if not fun_caves.db then
fun_caves.db = {}
end
if not fun_caves.db.teleport_data then
fun_caves.db.teleport_data = {}
end
if not fun_caves.db.teleport_data[name] then
fun_caves.db.teleport_data[name] = {}
end
local out = io.open(fun_caves.world..'/fun_caves_data.txt','w')
if not (out and name) then
return
end
if fun_caves.db.teleport_data[name].teleported_from then
user:setpos(fun_caves.db.teleport_data[name].teleported_from)
fun_caves.db.teleport_data[name].teleported_from = nil
else
local newpos
if area == 'overworld' then
newpos = {x=math.random(12000)-6000, y=120, z=math.random(12000)-6000}
else
return
end
user:setpos(newpos)
print('Fun Caves: '..name..' teleported to ('..pos.x..','..pos.y..','..pos.z..')')
fun_caves.db.teleport_data[name].teleported_from = pos
out:write(minetest.serialize(fun_caves.db))
user:set_physics_override({gravity=0.1})
minetest.after(20, function()
user:set_physics_override({gravity=1})
end)
end
end
minetest.register_craftitem("fun_caves:teleporter_steel_aquamarine", {
description = "Steel and Aquamarine Teleporter",
drawtype = "plantlike",
paramtype = "light",
tiles = {"fun_caves_tesseract_steel_aqua.png"},
inventory_image = "fun_caves_tesseract_steel_aqua.png",
groups = {dig_immediate = 3},
sounds = default.node_sound_stone_defaults(),
on_use = function(itemstack, user, pointed_thing)
teleporter(user, 'overworld', 1)
end,
})
minetest.register_craftitem("fun_caves:pure_steel", {
description = "Incredibly Pure Steel",
drawtype = "plantlike",
paramtype = "light",
tiles = {"default_steel_ingot.png"},
inventory_image = "default_steel_ingot.png",
groups = {dig_immediate = 3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_craftitem("fun_caves:perfect_aquamarine", {
description = "Perfect Aquamarine",
drawtype = "plantlike",
paramtype = "light",
tiles = {"default_diamond.png"},
inventory_image = "default_diamond.png",
groups = {dig_immediate = 3},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_craft({
output = 'fun_caves:teleporter_steel_aquamarine',
recipe = {
{'fun_caves:pure_steel', 'default:copper_ingot', 'fun_caves:pure_steel'},
{'fun_caves:pure_steel', 'fun_caves:perfect_aquamarine', 'fun_caves:pure_steel'},
{'fun_caves:pure_steel', 'default:obsidianbrick', 'fun_caves:pure_steel'},
}
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -1,2 +1,3 @@
Original spider textures: AspireMint Original spider textures: AspireMint
Original goblins textures and models: Francisco "FreeLikeGNU" Athens Original goblins textures and models: Francisco "FreeLikeGNU" Athens
Original tesseract: Claudio Rocchini (cc-by-sa 2.5), https://en.wikipedia.org/wiki/File:Runci_trunc_tessaract.png