[Quest API] Add Entity Variable Events to Perl/Lua (#4092)

* [Quest API] Add Entity Variable Events to Perl/Lua

- Add `EVENT_ENTITY_VARIABLE_DELETE`.
- Add `EVENT_ENTITY_VARIABLE_SET`.
- Add `EVENT_ENTITY_VARIABLE_UPDATE`.
- All export `$variable_name` and `$variable_value`.

- Add `event_entity_variable_delete`.
- Add `event_entity_variable_set`.
- Add `event_entity_variable_update`.
- All export `e.variable_name` and `e.variable_value`.

- Allows operators to perform operations when entity variables are cleared, deleted, set, or updated.

* Update mob.cpp

* Cleanup.

* Cleanup

* Update mob.cpp

* Update lua_general.cpp

* Update embparser_api.cpp
This commit is contained in:
Alex King
2024-02-19 21:34:33 -05:00
committed by GitHub
parent db3601c25c
commit 5a89fcfb78
8 changed files with 295 additions and 78 deletions
+4 -1
View File
@@ -6660,7 +6660,10 @@ luabind::scope lua_register_events() {
luabind::value("timer_pause", static_cast<int>(EVENT_TIMER_PAUSE)),
luabind::value("timer_resume", static_cast<int>(EVENT_TIMER_RESUME)),
luabind::value("timer_start", static_cast<int>(EVENT_TIMER_START)),
luabind::value("timer_stop", static_cast<int>(EVENT_TIMER_STOP))
luabind::value("timer_stop", static_cast<int>(EVENT_TIMER_STOP)),
luabind::value("entity_variable_delete", static_cast<int>(EVENT_ENTITY_VARIABLE_DELETE)),
luabind::value("entity_variable_set", static_cast<int>(EVENT_ENTITY_VARIABLE_SET)),
luabind::value("entity_variable_update", static_cast<int>(EVENT_ENTITY_VARIABLE_UPDATE))
)];
}