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