mirror of
http://repo.or.cz/minetest_pyramids/tsm_pyramids.git
synced 2025-01-03 13:00:23 +01:00
Rename global pyramids table
This commit is contained in:
parent
971bc77ff8
commit
3c0d699fd1
10
init.lua
10
init.lua
@ -1,4 +1,4 @@
|
|||||||
pyramids = {}
|
tsm_pyramids = {}
|
||||||
|
|
||||||
dofile(minetest.get_modpath("tsm_pyramids").."/mummy.lua")
|
dofile(minetest.get_modpath("tsm_pyramids").."/mummy.lua")
|
||||||
dofile(minetest.get_modpath("tsm_pyramids").."/nodes.lua")
|
dofile(minetest.get_modpath("tsm_pyramids").."/nodes.lua")
|
||||||
@ -15,7 +15,7 @@ local chest_stuff = {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function pyramids.fill_chest(pos)
|
function tsm_pyramids.fill_chest(pos)
|
||||||
minetest.after(2, function()
|
minetest.after(2, function()
|
||||||
local n = minetest.get_node(pos)
|
local n = minetest.get_node(pos)
|
||||||
if n and n.name and n.name == "default:chest" then
|
if n and n.name and n.name == "default:chest" then
|
||||||
@ -45,7 +45,7 @@ end
|
|||||||
|
|
||||||
local function add_spawner(pos)
|
local function add_spawner(pos)
|
||||||
minetest.set_node(pos, {name="tsm_pyramids:spawner_mummy"})
|
minetest.set_node(pos, {name="tsm_pyramids:spawner_mummy"})
|
||||||
if not minetest.setting_getbool("only_peaceful_mobs") then pyramids.spawn_mummy({x=pos.x,y=pos.y,z=pos.z-2},2) end
|
if not minetest.setting_getbool("only_peaceful_mobs") then tsm_pyramids.spawn_mummy({x=pos.x,y=pos.y,z=pos.z-2},2) end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function can_replace(pos)
|
local function can_replace(pos)
|
||||||
@ -104,8 +104,8 @@ local function make(pos, brick, sandstone, stone, sand, ptype)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
pyramids.make_room(pos, ptype)
|
tsm_pyramids.make_room(pos, ptype)
|
||||||
minetest.after(2, pyramids.make_traps, pos, ptype)
|
minetest.after(2, tsm_pyramids.make_traps, pos, ptype)
|
||||||
add_spawner({x=pos.x+11,y=pos.y+2, z=pos.z+17})
|
add_spawner({x=pos.x+11,y=pos.y+2, z=pos.z+17})
|
||||||
make_entrance({x=pos.x,y=pos.y, z=pos.z}, brick)
|
make_entrance({x=pos.x,y=pos.y, z=pos.z}, brick)
|
||||||
end
|
end
|
||||||
|
@ -321,7 +321,7 @@ minetest.register_craftitem("tsm_pyramids:spawn_egg", {
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function pyramids.spawn_mummy (pos, number)
|
function tsm_pyramids.spawn_mummy (pos, number)
|
||||||
for i=0,number do
|
for i=0,number do
|
||||||
minetest.add_entity(pos,"tsm_pyramids:mummy")
|
minetest.add_entity(pos,"tsm_pyramids:mummy")
|
||||||
end
|
end
|
||||||
|
6
room.lua
6
room.lua
@ -55,7 +55,7 @@ local function replace2(str, iy, code_table)
|
|||||||
return out..code_table[str]
|
return out..code_table[str]
|
||||||
end
|
end
|
||||||
|
|
||||||
function pyramids.make_room(pos, stype)
|
function tsm_pyramids.make_room(pos, stype)
|
||||||
local code_table = code_sandstone
|
local code_table = code_sandstone
|
||||||
if stype == "desert" then
|
if stype == "desert" then
|
||||||
code_table = code_desert
|
code_table = code_desert
|
||||||
@ -76,7 +76,7 @@ function pyramids.make_room(pos, stype)
|
|||||||
local p2 = 0
|
local p2 = 0
|
||||||
if n_str == "c" then
|
if n_str == "c" then
|
||||||
if ix < 3 then p2 = 1 else p2 = 3 end
|
if ix < 3 then p2 = 1 else p2 = 3 end
|
||||||
pyramids.fill_chest({x=hole.x+ix,y=hole.y-iy,z=hole.z+iz})
|
tsm_pyramids.fill_chest({x=hole.x+ix,y=hole.y-iy,z=hole.z+iz})
|
||||||
end
|
end
|
||||||
minetest.set_node({x=hole.x+ix,y=hole.y-iy,z=hole.z+iz}, {name=replace(n_str, iy, code_table, deco), param2=p2})
|
minetest.set_node({x=hole.x+ix,y=hole.y-iy,z=hole.z+iz}, {name=replace(n_str, iy, code_table, deco), param2=p2})
|
||||||
end
|
end
|
||||||
@ -84,7 +84,7 @@ function pyramids.make_room(pos, stype)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function pyramids.make_traps(pos, stype)
|
function tsm_pyramids.make_traps(pos, stype)
|
||||||
local code_table = code_sandstone
|
local code_table = code_sandstone
|
||||||
if stype == "desert" then
|
if stype == "desert" then
|
||||||
code_table = code_desert
|
code_table = code_desert
|
||||||
|
Loading…
Reference in New Issue
Block a user