mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
Scripting WIP (#70)
* Scripting introduced * AppImage workflow fixes * AppImage workflow simplified * README.md update * README.md update * small fix
This commit is contained in:
parent
ce26f0c227
commit
acce49f188
35 changed files with 649 additions and 138 deletions
26
src/logic/scripting/scripting.h
Normal file
26
src/logic/scripting/scripting.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#include <string>
|
||||
#include <filesystem>
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
class EnginePaths;
|
||||
class Content;
|
||||
class Level;
|
||||
class Block;
|
||||
class Player;
|
||||
struct block_funcs_set;
|
||||
|
||||
namespace scripting {
|
||||
extern const Content* content;
|
||||
extern Level* level;
|
||||
|
||||
void initialize(EnginePaths* paths);
|
||||
void on_world_load(Level* level);
|
||||
void on_world_quit();
|
||||
void update_block(const Block* block, int x, int y, int z);
|
||||
void random_update_block(const Block* block, int x, int y, int z);
|
||||
void on_block_placed(Player* player, const Block* block, int x, int y, int z);
|
||||
void on_block_broken(Player* player, const Block* block, int x, int y, int z);
|
||||
void load_block_script(std::string prefix, fs::path file, block_funcs_set* funcsset);
|
||||
void close();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue