mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
update entity script semantics
This commit is contained in:
parent
c54be7b2b1
commit
fc3994446a
11 changed files with 193 additions and 69 deletions
|
|
@ -76,9 +76,9 @@ namespace scripting {
|
|||
/// @return true if prevents default action
|
||||
bool on_item_break_block(Player* player, const ItemDef* item, int x, int y, int z);
|
||||
|
||||
bool on_entity_spawn(const EntityDef& def, entityid_t eid);
|
||||
bool on_entity_despawn(const EntityDef& def, entityid_t eid);
|
||||
bool on_entity_grounded(const EntityDef& def, entityid_t eid);
|
||||
scriptenv on_entity_spawn(const EntityDef& def, entityid_t eid, entity_funcs_set&);
|
||||
bool on_entity_despawn(const EntityDef& def, const Entity& entity);
|
||||
bool on_entity_grounded(const EntityDef& def, const Entity& entity);
|
||||
|
||||
/// @brief Called on UI view show
|
||||
void on_ui_open(
|
||||
|
|
@ -115,9 +115,8 @@ namespace scripting {
|
|||
|
||||
void load_entity_script(
|
||||
const scriptenv& env,
|
||||
const std::string& prefix,
|
||||
const fs::path& file,
|
||||
entity_funcs_set& funcsset);
|
||||
const EntityDef& def,
|
||||
const fs::path& file);
|
||||
|
||||
/// @brief Load package-specific world script
|
||||
/// @param env environment
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue