Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
scripting_emerge.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2022 sfan5 <sfan5@live.de>
4
5#pragma once
6#include "cpp_api/s_base.h"
7#include "cpp_api/s_mapgen.h"
9
10class EmergeThread;
11
13 virtual public ScriptApiBase,
14 public ScriptApiMapgen,
16{
17public:
19
20protected:
21 bool checkPathInternal(const std::string &abs_path, bool write_required,
22 bool *write_allowed) override {
24 abs_path, write_required, write_allowed);
25 };
26
27private:
28 void InitializeModApi(lua_State *L, int top);
29};
Definition scripting_emerge.h:16
void InitializeModApi(lua_State *L, int top)
Definition scripting_emerge.cpp:57
EmergeScripting(EmergeThread *parent)
Definition scripting_emerge.cpp:29
bool checkPathInternal(const std::string &abs_path, bool write_required, bool *write_allowed) override
Should check if the given path may be accessed.
Definition scripting_emerge.h:21
Definition emerge_internal.h:25
Definition s_base.h:64
lua_State * getStack()
Definition s_base.h:143
Definition s_mapgen.h:17
Definition s_security.h:28
static bool checkPathWithGamedef(lua_State *L, const std::string &abs_path, bool write_required, bool *write_allowed)
Definition s_security.cpp:607