aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorAndrei Stepanov <adem4ik@gmail.com>2019-12-04 03:32:16 +0000
committerrubenwardy <rw@rubenwardy.com>2020-01-24 18:34:11 +0000
commitd3bd7c5c0fedf802354f1b0b6db7eed10b57726e (patch)
tree0d1541cc52fde4b2dd3ab1a60a2747152e0f5cf2 /builtin
parent30ea18a127c32cdf91b619a4fcc5867f84bacf9e (diff)
downloadminetest-d3bd7c5c0fedf802354f1b0b6db7eed10b57726e.tar.gz
minetest-d3bd7c5c0fedf802354f1b0b6db7eed10b57726e.tar.bz2
minetest-d3bd7c5c0fedf802354f1b0b6db7eed10b57726e.zip
Translated using Weblate (Russian)
Currently translated at 100.0% (1274 of 1274 strings)
Diffstat (limited to 'builtin')
0 files changed, 0 insertions, 0 deletions
l 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. */ #include "mapgen_singlenode.h" #include "voxel.h" #include "mapblock.h" #include "mapnode.h" #include "map.h" #include "nodedef.h" #include "voxelalgorithms.h" #include "emerge.h" MapgenSinglenode::MapgenSinglenode(int mapgenid, MapgenParams *params, EmergeManager *emerge) : Mapgen(mapgenid, params, emerge) { flags = params->flags; INodeDefManager *ndef = emerge->ndef; c_node = ndef->getId("mapgen_singlenode"); if (c_node == CONTENT_IGNORE) c_node = CONTENT_AIR; } MapgenSinglenode::~MapgenSinglenode() { } //////////////////////// Map generator void MapgenSinglenode::makeChunk(BlockMakeData *data) { // Pre-conditions assert(data->vmanip); assert(data->nodedef); assert(data->blockpos_requested.X >= data->blockpos_min.X && data->blockpos_requested.Y >= data->blockpos_min.Y && data->blockpos_requested.Z >= data->blockpos_min.Z); assert(data->blockpos_requested.X <= data->blockpos_max.X && data->blockpos_requested.Y <= data->blockpos_max.Y && data->blockpos_requested.Z <= data->blockpos_max.Z); this->generating = true; this->vm = data->vmanip; this->ndef = data->nodedef; v3s16 blockpos_min = data->blockpos_min; v3s16 blockpos_max = data->blockpos_max; // Area of central chunk v3s16 node_min = blockpos_min*MAP_BLOCKSIZE;