mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-11 13:25:53 -04:00
use table instead of vector in return type
This commit is contained in:
parent
179341b221
commit
feeb15d1ff
@ -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…
x
Reference in New Issue
Block a user