mirror of
https://github.com/OpenMW/openmw.git
synced 2025-10-18 11:46:37 +00:00
use table instead of vector in return type
This commit is contained in:
parent
179341b221
commit
feeb15d1ff
1 changed files with 3 additions and 3 deletions
|
@ -183,15 +183,15 @@ namespace MWLua
|
|||
return shader;
|
||||
};
|
||||
|
||||
api["getChain"] = []() {
|
||||
std::vector<Shader> chain;
|
||||
api["getChain"] = [context]() {
|
||||
sol::table chain(context.sol(), sol::create);
|
||||
|
||||
for (const auto& shader : MWBase::Environment::get().getWorld()->getPostProcessor()->getChain())
|
||||
{
|
||||
// Don't expose internal shaders to the API, they should be invisible to the user
|
||||
if (shader->getInternal())
|
||||
continue;
|
||||
chain.emplace_back(shader);
|
||||
chain.add(Shader(shader));
|
||||
}
|
||||
|
||||
return chain;
|
||||
|
|
Loading…
Reference in a new issue