diff --git a/TR5Main/Scripting/GameScriptSoundSourceInfo.cpp b/TR5Main/Scripting/GameScriptSoundSourceInfo.cpp index 8b1d4c0e1..b6bab0622 100644 --- a/TR5Main/Scripting/GameScriptSoundSourceInfo.cpp +++ b/TR5Main/Scripting/GameScriptSoundSourceInfo.cpp @@ -2,6 +2,7 @@ #include "ScriptAssert.h" #include "GameScriptSoundSourceInfo.h" #include "GameScriptPosition.h" +#include "ScriptUtil.h" /*** Sound source info @@ -12,6 +13,7 @@ Sound source info static constexpr auto LUA_CLASS_NAME{ "SoundSourceInfo" }; static auto index_error = index_error_maker(GameScriptSoundSourceInfo, LUA_CLASS_NAME); +static auto newindex_error = newindex_error_maker(GameScriptSoundSourceInfo, LUA_CLASS_NAME); GameScriptSoundSourceInfo::GameScriptSoundSourceInfo(SOUND_SOURCE_INFO & ref, bool temp) : m_soundSource{ref}, m_temporary{ temp } {}; @@ -27,6 +29,7 @@ void GameScriptSoundSourceInfo::Register(sol::state* state) { state->new_usertype(LUA_CLASS_NAME, sol::meta_function::index, index_error, + sol::meta_function::new_index, newindex_error, /// (@{Position}) position in level // @mem pos