mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-24 15:55:13 +00:00
Add igloo schematic (kinda)
This commit is contained in:
parent
b433107f67
commit
24ed86f18c
2 changed files with 15 additions and 2 deletions
BIN
mods/MAPGEN/mcl_structures/build/igloo_top.mts
Normal file
BIN
mods/MAPGEN/mcl_structures/build/igloo_top.mts
Normal file
Binary file not shown.
|
@ -147,6 +147,8 @@ mcl_structures.call_struct= function(pos, struct_style)
|
||||||
mcl_structures.generate_desert_temple(pos)
|
mcl_structures.generate_desert_temple(pos)
|
||||||
elseif struct_style == "desert_well" then
|
elseif struct_style == "desert_well" then
|
||||||
mcl_structures.generate_desert_well(pos)
|
mcl_structures.generate_desert_well(pos)
|
||||||
|
elseif struct_style == "igloo" then
|
||||||
|
mcl_structures.generate_igloo_top(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -166,6 +168,14 @@ mcl_structures.generate_desert_well = function(pos)
|
||||||
minetest.place_schematic(newpos, path, "0", nil, true)
|
minetest.place_schematic(newpos, path, "0", nil, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
mcl_structures.generate_igloo_top = function(pos)
|
||||||
|
-- FIXME: This spawns bookshelf instead of furnace. Fix this!
|
||||||
|
-- Furnace does ot work atm because apparently meta is not set. :-(
|
||||||
|
local newpos = {x=pos.x,y=pos.y-2,z=pos.z}
|
||||||
|
local path = minetest.get_modpath("mcl_structures").."/build/igloo_top.mts"
|
||||||
|
minetest.place_schematic(newpos, path, "random", nil, true)
|
||||||
|
end
|
||||||
|
|
||||||
mcl_structures.generate_desert_temple = function(pos)
|
mcl_structures.generate_desert_temple = function(pos)
|
||||||
-- No Generating for the temple ... Why using it ? No Change
|
-- No Generating for the temple ... Why using it ? No Change
|
||||||
local temple = mcl_structures.get_struct("desert_temple.we")
|
local temple = mcl_structures.get_struct("desert_temple.we")
|
||||||
|
@ -229,7 +239,7 @@ end
|
||||||
|
|
||||||
-- Debug command
|
-- Debug command
|
||||||
minetest.register_chatcommand("spawnstruct", {
|
minetest.register_chatcommand("spawnstruct", {
|
||||||
params = "desert_temple | desert_well | village",
|
params = "desert_temple | desert_well | igloo | village",
|
||||||
description = "Generate a pre-defined structure near your position.",
|
description = "Generate a pre-defined structure near your position.",
|
||||||
privs = {debug = true},
|
privs = {debug = true},
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
|
@ -247,6 +257,9 @@ minetest.register_chatcommand("spawnstruct", {
|
||||||
elseif param == "desert_well" then
|
elseif param == "desert_well" then
|
||||||
mcl_structures.generate_desert_well(pos)
|
mcl_structures.generate_desert_well(pos)
|
||||||
minetest.chat_send_player(name, "Desert well created.")
|
minetest.chat_send_player(name, "Desert well created.")
|
||||||
|
elseif param == "igloo" then
|
||||||
|
mcl_structures.generate_igloo_top(pos)
|
||||||
|
minetest.chat_send_player(name, "Igloo created.")
|
||||||
elseif param == "" then
|
elseif param == "" then
|
||||||
minetest.chat_send_player(name, "Error: No structure type given. Please use “/spawnstruct <type>”.")
|
minetest.chat_send_player(name, "Error: No structure type given. Please use “/spawnstruct <type>”.")
|
||||||
errord = true
|
errord = true
|
||||||
|
@ -255,7 +268,7 @@ minetest.register_chatcommand("spawnstruct", {
|
||||||
errord = true
|
errord = true
|
||||||
end
|
end
|
||||||
if errord then
|
if errord then
|
||||||
minetest.chat_send_player(name, "Avaiable types: desert_temple, desert_well, village")
|
minetest.chat_send_player(name, "Avaiable types: desert_temple, desert_well, igloo, village")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue