Zepha/src/lua/LocalLuaParser.h
Auri a9a12a89d9 Removed ClientState entirely and restructured client data passing.
* Updated the fenv polyfill.
* Added a fromString helper to Address.
* Added documentation comments to some classes. More to come!
* Configured CLion code style settings.
2020-11-03 23:29:30 -08:00

37 lines
857 B
C++

//
// Created by aurailus on 17/12/18.
//
#pragma once
#include "lua/LuaParser.h"
#include "util/CovariantPtr.h"
#include "lua/LocalModHandler.h"
#include "lua/LuaKeybindHandler.h"
class Client;
class LocalWorld;
class LocalPlayer;
class LocalSubgame;
class LocalLuaParser : public LuaParser {
public:
explicit LocalLuaParser(LocalSubgame& game);
void init(WorldPtr world, PlayerPtr player, Client& client);
void update(double delta) override;
LocalModHandler& getHandler();
private:
void loadApi(WorldPtr world, PlayerPtr player);
void registerDefs();
virtual sol::protected_function_result errorCallback(sol::protected_function_result r) const override;
sol::protected_function_result runFileSandboxed(const std::string& file);
LuaKeybindHandler keybinds;
LocalModHandler handler;
double delta = 0;
};