mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
New scripting features
This commit is contained in:
parent
05fe86e64c
commit
faabb8178a
10 changed files with 129 additions and 43 deletions
|
|
@ -8,21 +8,26 @@ class Content;
|
|||
class Level;
|
||||
class Block;
|
||||
class Player;
|
||||
class ItemDef;
|
||||
struct block_funcs_set;
|
||||
struct item_funcs_set;
|
||||
class BlocksController;
|
||||
|
||||
namespace scripting {
|
||||
extern const Content* content;
|
||||
extern Level* level;
|
||||
extern BlocksController* blocks;
|
||||
|
||||
void initialize(EnginePaths* paths);
|
||||
void on_world_load(Level* level);
|
||||
void on_world_load(Level* level, BlocksController* blocks);
|
||||
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 on_block_interact(Player* player, const Block* block, int x, int y, int z);
|
||||
bool on_item_use_on_block(Player* player, const ItemDef* item, int x, int y, int z);
|
||||
bool on_item_break_block(Player* player, const ItemDef* item, int x, int y, int z);
|
||||
void load_block_script(std::string prefix, fs::path file, block_funcs_set* funcsset);
|
||||
void load_item_script(std::string prefix, fs::path file, item_funcs_set* funcsset);
|
||||
void close();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue