aboutsummaryrefslogtreecommitdiff
path: root/builtin/game/static_spawn.lua
diff options
context:
space:
mode:
authorparamat <paramat@users.noreply.github.com>2017-07-28 03:31:11 +0100
committerparamat <mat.gregory@virginmedia.com>2017-07-30 18:40:55 +0100
commitb20d01a3f19ea7ad1e788077af1ed5769648e3a1 (patch)
tree2d30ee6e8771bfddeb5140e4304e03795ef81190 /builtin/game/static_spawn.lua
parent238d752fa3021fa7294a4df79bfa0b8a46f4a018 (diff)
downloadminetest-b20d01a3f19ea7ad1e788077af1ed5769648e3a1.tar.gz
minetest-b20d01a3f19ea7ad1e788077af1ed5769648e3a1.tar.bz2
minetest-b20d01a3f19ea7ad1e788077af1ed5769648e3a1.zip
Dungeons: Use biome 'node_stone' if normal stone types not detected
Construct dungeons from the node defined as biome 'node_stone' if 'mapgen_stone', 'mapgen_desert_stone' and 'mapgen_sandstone' are not detected. Feature long-intended by kwolekr/hmmmm and present in code as a TODO.
Diffstat (limited to 'builtin/game/static_spawn.lua')
0 files changed, 0 insertions, 0 deletions
m">You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "scripting_client.h" #include "client/client.h" #include "cpp_api/s_internal.h" #include "lua_api/l_client.h" #include "lua_api/l_env.h" #include "lua_api/l_item.h" #include "lua_api/l_itemstackmeta.h" #include "lua_api/l_minimap.h" #include "lua_api/l_modchannels.h" #include "lua_api/l_particles_local.h" #include "lua_api/l_storage.h" #include "lua_api/l_sound.h" #include "lua_api/l_util.h" #include "lua_api/l_item.h" #include "lua_api/l_nodemeta.h" #include "lua_api/l_localplayer.h" #include "lua_api/l_camera.h" ClientScripting::ClientScripting(Client *client): ScriptApiBase(ScriptingType::Client) { setGameDef(client); SCRIPTAPI_PRECHECKHEADER // Security is mandatory client side initializeSecurityClient(); lua_getglobal(L, "core"); int top = lua_gettop(L); lua_newtable(L); lua_setfield(L, -2, "ui"); InitializeModApi(L, top); lua_pop(L, 1); if (client->getMinimap()) LuaMinimap::create(L, client->getMinimap()); // Push builtin initialization type lua_pushstring(L, "client"); lua_setglobal(L, "INIT"); infostream << "SCRIPTAPI: Initialized client game modules" << std::endl; } void ClientScripting::InitializeModApi(lua_State *L, int top) { LuaItemStack::Register(L); ItemStackMetaRef::Register(L); LuaRaycast::Register(L); StorageRef::Register(L); LuaMinimap::Register(L); NodeMetaRef::RegisterClient(L); LuaLocalPlayer::Register(L); LuaCamera::Register(L); ModChannelRef::Register(L); ModApiUtil::InitializeClient(L, top); ModApiClient::Initialize(L, top); ModApiStorage::Initialize(L, top); ModApiEnvMod::InitializeClient(L, top); ModApiChannels::Initialize(L, top); ModApiParticlesLocal::Initialize(L, top); } void ClientScripting::on_client_ready(LocalPlayer *localplayer) { LuaLocalPlayer::create(getStack(), localplayer); } void ClientScripting::on_camera_ready(Camera *camera) { LuaCamera::create(getStack(), camera); }