mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-08-03 15:27:13 -04:00
throw if vfxId is empty
This commit is contained in:
parent
c75121e6ec
commit
2ad54439da
@ -303,8 +303,9 @@ namespace MWLua
|
||||
api["remove"] = [context](std::string vfxId) {
|
||||
context.mLuaManager->addAction(
|
||||
[vfxId = vfxId] {
|
||||
if (!vfxId.empty())
|
||||
MWBase::Environment::get().getWorld()->removeEffect(vfxId);
|
||||
if (vfxId.empty())
|
||||
throw std::runtime_error("vfxId is empty");
|
||||
MWBase::Environment::get().getWorld()->removeEffect(vfxId);
|
||||
},
|
||||
"openmw.vfx.remove");
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user