Add newindex error to SoundSourceInfo.

This commit is contained in:
hispidence 2021-08-20 01:51:51 +01:00
parent 1e2a2bfa63
commit 2039df5a27

View file

@ -2,6 +2,7 @@
#include "ScriptAssert.h" #include "ScriptAssert.h"
#include "GameScriptSoundSourceInfo.h" #include "GameScriptSoundSourceInfo.h"
#include "GameScriptPosition.h" #include "GameScriptPosition.h"
#include "ScriptUtil.h"
/*** /***
Sound source info Sound source info
@ -12,6 +13,7 @@ Sound source info
static constexpr auto LUA_CLASS_NAME{ "SoundSourceInfo" }; static constexpr auto LUA_CLASS_NAME{ "SoundSourceInfo" };
static auto index_error = index_error_maker(GameScriptSoundSourceInfo, LUA_CLASS_NAME); 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 } 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<GameScriptSoundSourceInfo>(LUA_CLASS_NAME, state->new_usertype<GameScriptSoundSourceInfo>(LUA_CLASS_NAME,
sol::meta_function::index, index_error, sol::meta_function::index, index_error,
sol::meta_function::new_index, newindex_error,
/// (@{Position}) position in level /// (@{Position}) position in level
// @mem pos // @mem pos