update entity script semantics

This commit is contained in:
MihailRis
2024-06-29 21:01:30 +03:00
parent c54be7b2b1
commit fc3994446a
11 changed files with 193 additions and 69 deletions
+5 -6
View File
@@ -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