diff --git a/apps/openmw-mp/Script/Functions/Objects.cpp b/apps/openmw-mp/Script/Functions/Objects.cpp index 878b1a198..5b4f4cb68 100644 --- a/apps/openmw-mp/Script/Functions/Objects.cpp +++ b/apps/openmw-mp/Script/Functions/Objects.cpp @@ -449,3 +449,45 @@ void ObjectFunctions::SendConsoleCommand(bool broadcast) noexcept if (broadcast) packet->Send(true); } + +// All methods below are deprecated versions of methods from above + +void ObjectFunctions::ReadLastEvent() noexcept +{ + ReadLastObjectList(); +} + +void ObjectFunctions::InitializeEvent(unsigned short pid) noexcept +{ + InitializeObjectList(pid); +} + +unsigned char ObjectFunctions::GetEventAction() noexcept +{ + return GetObjectListAction(); +} + +unsigned char ObjectFunctions::GetEventContainerSubAction() noexcept +{ + return GetObjectListContainerSubAction(); +} + +void ObjectFunctions::SetEventCell(const char* cellDescription) noexcept +{ + SetObjectListCell(cellDescription); +} + +void ObjectFunctions::SetEventAction(unsigned char action) noexcept +{ + SetObjectListAction(action); +} + +void ObjectFunctions::SetEventConsoleCommand(const char* consoleCommand) noexcept +{ + SetObjectListConsoleCommand(consoleCommand); +} + +void ObjectFunctions::AddWorldObject() noexcept +{ + AddObject(); +} diff --git a/apps/openmw-mp/Script/Functions/Objects.hpp b/apps/openmw-mp/Script/Functions/Objects.hpp index f8992b7de..4e5c3d6ce 100644 --- a/apps/openmw-mp/Script/Functions/Objects.hpp +++ b/apps/openmw-mp/Script/Functions/Objects.hpp @@ -81,7 +81,16 @@ {"SendDoorState", ObjectFunctions::SendDoorState},\ {"SendDoorDestination", ObjectFunctions::SendDoorDestination},\ {"SendContainer", ObjectFunctions::SendContainer},\ - {"SendConsoleCommand", ObjectFunctions::SendConsoleCommand} + {"SendConsoleCommand", ObjectFunctions::SendConsoleCommand},\ + \ + {"ReadLastEvent", ObjectFunctions::ReadLastEvent},\ + {"InitializeEvent", ObjectFunctions::InitializeEvent},\ + {"GetEventAction", ObjectFunctions::GetEventAction},\ + {"GetEventContainerSubAction", ObjectFunctions::GetEventContainerSubAction},\ + {"SetEventCell", ObjectFunctions::SetEventCell},\ + {"SetEventAction", ObjectFunctions::SetEventAction},\ + {"SetEventConsoleCommand", ObjectFunctions::SetEventConsoleCommand},\ + {"AddWorldObject", ObjectFunctions::AddWorldObject} class ObjectFunctions { @@ -747,6 +756,18 @@ public: */ static void SendConsoleCommand(bool broadcast = false) noexcept; + + // All methods below are deprecated versions of methods from above + + static void ReadLastEvent() noexcept; + static void InitializeEvent(unsigned short pid) noexcept; + static unsigned char GetEventAction() noexcept; + static unsigned char GetEventContainerSubAction() noexcept; + static void SetEventCell(const char* cellDescription) noexcept; + static void SetEventAction(unsigned char action) noexcept; + static void SetEventConsoleCommand(const char* consoleCommand) noexcept; + static void AddWorldObject() noexcept; + };