cheap ziggurat code

master
Izzy 2019-06-30 13:23:14 -06:00
parent 13bd810464
commit 8252946140
2 changed files with 62 additions and 4 deletions

View File

@ -16,6 +16,7 @@ local modname = "potions"
dofile(modpath.."/metals.lua")
dofile(modpath.."/geodes.lua")
dofile(modpath.."/hotsprings.lua")
dofile(modpath.."/structures/ziggurat.lua")
-- core
dofile(modpath.."/minetunnels.lua")
@ -62,7 +63,7 @@ potions/magic
some potions are thrown, to break and activate where they land
conjure a prison
effectively change biome
clone
clone object
[engine]
@ -75,6 +76,9 @@ potions/magic
mapgen "regions" or extra biome params ("magicness" or other such variations)
ore-ish registration that guarantees a certain limited number of spawns
mapgen distance-from-center params
store a region in a gem, release later
more particle functions
raillike path prediction and pathing for entities
fermentation, distillation, soaking/boiling pot, ball mill
glass crafting furnace
@ -101,7 +105,7 @@ gems:
lapis lazuli, opal, citrine, aquamarine
cyclopian masonry
ancient sunken cities
fumaroles spwaning, textures and features
@ -118,7 +122,10 @@ undersea volcanic vents
deep-sea worms
thornbushes
blighted areas, purple miasma, dead plants, etc
creosote bush
pirate ships, treasure chests
quicksand
mayan temples on top of mountains
magic beanstalk
arching bridge
@ -129,15 +136,20 @@ regeneration amulets
force field
fireball
spell to unlock chests
treasure maps of some sort
minetunnels:
torches in coves
wood bracing
ceiling bolts
ladders to upper areas
minecart chests
wood walkways over caverns
hail of arrows trap
catapult that flings player back
stone columns in large rooms
chemistry glassware getting used or consumed
brown version of glassware
fancier glassware needed for fancier chemicals

46
structures/ziggurat.lua Normal file
View File

@ -0,0 +1,46 @@
local function fill_block(min, max, node)
for x = min.x, max.x do
for y = min.y, max.y do
for z = min.z, max.z do
minetest.set_node({x=x, y=y, z=z}, node)
end
end
end
end
local function ziggurat(pos, step_width, step_height, bottom_h_sz, num_steps)
local w = bottom_h_sz
for sn = 1,num_steps do
fill_block(
vector.subtract(pos, {x=w, y=0, z=w}),
vector.add(pos, {x=w, y=step_height*sn-1, z=w}),
{name="default:sandstonebrick"}
)
w = w - step_width
end
-- TODO: steps
end
minetest.register_node("potions:zseed", {
description = "Ziggurat Seed",
drawtype = "node",
tiles = {"default_stone_brick.png^default_tool_pick_stone.png"},
groups = {cracky=3,},
on_construct = function(pos)
ziggurat(pos, 2, 2, 8, 5)
end
})