--[[ More Blocks: slope definitions Copyright (c) 2011-2015 Calinou and contributors. Licensed under the zlib license. See LICENSE.md for more information. --]] local S = moreblocks.intllib local box_slope = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5}, {-0.5, -0.25, -0.25, 0.5, 0, 0.5}, {-0.5, 0, 0, 0.5, 0.25, 0.5}, {-0.5, 0.25, 0.25, 0.5, 0.5, 0.5} } } local box_slope_half = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, {-0.5, -0.375, -0.25, 0.5, -0.25, 0.5}, {-0.5, -0.25, 0, 0.5, -0.125, 0.5}, {-0.5, -0.125, 0.25, 0.5, 0, 0.5}, } } local box_slope_half_raised = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, 0.125, 0.5}, {-0.5, 0.125, -0.25, 0.5, 0.25, 0.5}, {-0.5, 0.25, 0, 0.5, 0.375, 0.5}, {-0.5, 0.375, 0.25, 0.5, 0.5, 0.5}, } } --============================================================== local box_slope_inner = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5}, {-0.5, -0.5, -0.25, 0.5, 0, 0.5}, {-0.5, -0.5, -0.5, 0.25, 0, 0.5}, {-0.5, 0, -0.5, 0, 0.25, 0.5}, {-0.5, 0, 0, 0.5, 0.25, 0.5}, {-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}, {-0.5, 0.25, -0.5, -0.25, 0.5, 0.5}, } } local box_slope_inner_half = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, {-0.5, -0.375, -0.25, 0.5, -0.25, 0.5}, {-0.5, -0.375, -0.5, 0.25, -0.25, 0.5}, {-0.5, -0.25, -0.5, 0, -0.125, 0.5}, {-0.5, -0.25, 0, 0.5, -0.125, 0.5}, {-0.5, -0.125, 0.25, 0.5, 0, 0.5}, {-0.5, -0.125, -0.5, -0.25, 0, 0.5}, } } local box_slope_inner_half_raised = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, 0.125, 0.5}, {-0.5, 0.125, -0.25, 0.5, 0.25, 0.5}, {-0.5, 0.125, -0.5, 0.25, 0.25, 0.5}, {-0.5, 0.25, -0.5, 0, 0.375, 0.5}, {-0.5, 0.25, 0, 0.5, 0.375, 0.5}, {-0.5, 0.375, 0.25, 0.5, 0.5, 0.5}, {-0.5, 0.375, -0.5, -0.25, 0.5, 0.5}, } } --============================================================== local box_slope_outer = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5}, {-0.5, -0.25, -0.25, 0.25, 0, 0.5}, {-0.5, 0, 0, 0, 0.25, 0.5}, {-0.5, 0.25, 0.25, -0.25, 0.5, 0.5} } } local box_slope_outer_half = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, {-0.5, -0.375, -0.25, 0.25, -0.25, 0.5}, {-0.5, -0.25, 0, 0, -0.125, 0.5}, {-0.5, -0.125, 0.25, -0.25, 0, 0.5} } } local box_slope_outer_half_raised = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, 0.125, 0.5}, {-0.5, 0.125, -0.25, 0.25, 0.25, 0.5}, {-0.5, 0.25, 0, 0, 0.375, 0.5}, {-0.5, 0.375, 0.25, -0.25, 0.5, 0.5} } } -- Node will be called :slope_ function register_slope(modname, subname, recipeitem, groups, images, description, drop, light) return stairsplus:register_slope(modname, subname, recipeitem, { groups = groups, tiles = images, description = description, drop = drop, light_source = light, sounds = default.node_sound_stone_defaults(), }) end function stairsplus:register_slope(modname, subname, recipeitem, fields) local defs = { [""] = { mesh = "moreblocks_slope.obj", collision_box = box_slope, selection_box = box_slope, }, ["_half"] = { mesh = "moreblocks_slope_half.obj", collision_box = box_slope_half, selection_box = box_slope_half, }, ["_half_raised"] = { mesh = "moreblocks_slope_half_raised.obj", collision_box = box_slope_half_raised, selection_box = box_slope_half_raised, }, --============================================================== ["_inner"] = { mesh = "moreblocks_slope_inner.obj", collision_box = box_slope_inner, selection_box = box_slope_inner, }, ["_inner_half"] = { mesh = "moreblocks_slope_inner_half.obj", collision_box = box_slope_inner_half, selection_box = box_slope_inner_half, }, ["_inner_half_raised"] = { mesh = "moreblocks_slope_inner_half_raised.obj", collision_box = box_slope_inner_half_raised, selection_box = box_slope_inner_half_raised, }, --============================================================== ["_inner_cut"] = { mesh = "moreblocks_slope_inner_cut.obj", collision_box = box_slope_inner, selection_box = box_slope_inner, }, ["_inner_cut_half"] = { mesh = "moreblocks_slope_inner_cut_half.obj", collision_box = box_slope_inner_half, selection_box = box_slope/* Minetest Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. 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. */ #pragma once #include <map> #include <string> #include "database.h" #include "irrlichttypes.h" class Database_Dummy : public MapDatabase, public PlayerDatabase { public: bool saveBlock(const v3s16 &pos, const std::string &data); void loadBlock(const v3s16 &pos, std::string *block); bool deleteBlock(const v3s16 &pos); void listAllLoadableBlocks(std::vector<v3s16> &dst); void savePlayer(RemotePlayer *player); bool loadPlayer(RemotePlayer *player, PlayerSAO *sao); bool removePlayer(const std::string &name); void listPlayers(std::vector<std::string> &res); void beginSave() {} void endSave() {} private: std::map<s64, std::string> m_database; std::set<std::string> m_player_database; }; odname .. ":micro_" .. subname, "", ""}, {recipeitem, modname .. ":micro_" .. subname, ""}, {recipeitem, recipeitem, modname .. ":micro_" .. subname}, }, }) minetest.register_craft({ output = modname .. ":slope_" .. subname .. "_outer 7", recipe = { {"", "", modname .. ":micro_" .. subname}, {"", modname .. ":micro_" .. subname, recipeitem}, {modname .. ":micro_" .. subname, recipeitem, recipeitem}, }, }) minetest.register_craft({ output = modname .. ":slope_" .. subname .. "_outer_half 10", recipe = { {modname .. ":micro_" .. subname, "", ""}, {recipeitem, recipeitem, modname .. ":micro_" .. subname}, }, }) minetest.register_craft({ output = modname .. ":slope_" .. subname .. "_outer_half 10", recipe = { {"", "", modname .. ":micro_" .. subname}, {modname .. ":micro_" .. subname, recipeitem, recipeitem}, }, }) minetest.register_craft({ output = modname .. ":slope_" .. subname .. "_outer_half_raised 7", recipe = { {modname .. ":micro_" .. subname, "", ""}, {recipeitem, recipeitem, modname .. ":micro_" .. subname}, {recipeitem, recipeitem, recipeitem}, }, }) minetest.register_craft({ output = modname .. ":slope_" .. subname .. "_outer_half_raised 7", recipe = { {"", "", modname .. ":micro_" .. subname}, {modname .. ":micro_" .. subname, recipeitem, recipeitem}, {recipeitem, recipeitem, recipeitem}, }, }) --================================================= Shapeless == minetest.register_craft({ type = "shapeless", output = recipeitem, recipe = {modname .. ":slope_" .. subname, modname .. ":slope_" .. subname}, }) minetest.register_craft({ type = "shapeless", output = recipeitem, recipe = {modname .. ":slope_" .. subname .. "_outer_cut", modname .. ":slope_" .. subname .. "_outer_cut"}, }) minetest.register_craft({ type = "shapeless", output = recipeitem, recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half_raised"}, }) minetest.register_craft({ type = "shapeless", output = recipeitem, recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":slab_" .. subname, recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":slope_" .. subname .. "_half_raised", recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":slope_" .. subname .. "_half_raised", recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_half"}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":slope_" .. subname .. "_inner_half_raised", recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_half"}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":slope_" .. subname .. "_outer_half_raised", recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_outer_half"}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":slope_" .. subname .. "_outer_cut_half_raised", recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_outer_cut_half"}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":slope_" .. subname .. "_outer_cut", recipe = {modname .. ":slope_" .. subname .. "_outer"}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":slope_" .. subname .. "_outer_cut_half", recipe = {modname .. ":slope_" .. subname .. "_outer_half"}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":slope_" .. subname .. "_outer_cut_half_raised", recipe = {modname .. ":slope_" .. subname .. "_outer_half_raised"}, }) end