Minetest 5.10.0-dev
 
Loading...
Searching...
No Matches
s_mapgen.h
Go to the documentation of this file.
1/*
2Minetest
3Copyright (C) 2022 sfan5 <sfan5@live.de>
4
5This program is free software; you can redistribute it and/or modify
6it under the terms of the GNU Lesser General Public License as published by
7the Free Software Foundation; either version 2.1 of the License, or
8(at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU Lesser General Public License for more details.
14
15You should have received a copy of the GNU Lesser General Public License along
16with this program; if not, write to the Free Software Foundation, Inc.,
1751 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18*/
19
20#pragma once
21
22#include "cpp_api/s_base.h"
23
24struct BlockMakeData;
25
26/*
27 * Note that this is the class defining the functions called inside the emerge
28 * Lua state, not the server one.
29 */
30
31class ScriptApiMapgen : virtual public ScriptApiBase
32{
33public:
34
35 void on_mods_loaded();
36 void on_shutdown();
37
38 // Called after generating a piece of map, before writing it to the map
39 void on_generated(BlockMakeData *bmdata, u32 seed);
40};
Definition s_base.h:79
Definition s_mapgen.h:32
void on_generated(BlockMakeData *bmdata, u32 seed)
Definition s_mapgen.cpp:48
void on_shutdown()
Definition s_mapgen.cpp:37
void on_mods_loaded()
Definition s_mapgen.cpp:26
Definition emerge.h:52