10#ifndef GAME_INSTANCE_HPP
11#define GAME_INSTANCE_HPP
26 int GetSetting(
const std::string &name)
override;
All static information from an Game like name, version, etc.
int GetSetting(const std::string &name) override
Get the value of a setting of the current instance.
void Died() override
Tell the script it died.
ScriptInfo * FindLibrary(const std::string &library, int version) override
Find a library.
void RegisterAPI() override
Register all API functions to the VM.
void Initialize(class GameInfo *info)
Initialize the script and prepare it for its first run.
CommandCallbackData * GetDoCommandCallback() override
Get the callback handling DoCommands in case of networking.
void LoadDummyScript() override
Load the dummy script.
All static information from an Script like name, version, etc.
ScriptInstance(std::string_view api_name)
Create a new script.
void CommandCallbackData(Commands cmd, const CommandCost &result, const CommandDataBuffer &data, CommandDataBuffer result_data)
Define a callback function for the client, after the command is finished.
The ScriptInstance tracks a script.