1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-12-25 05:53:09 +00:00

make it possible to remove anonymous vfx

This commit is contained in:
Sebastian Fieber 2025-11-30 16:27:10 +01:00 committed by Alexei Kotov
parent 9524906768
commit 647d655f2e
2 changed files with 1 additions and 3 deletions

View file

@ -294,8 +294,6 @@ namespace MWLua
api["remove"] = [context](std::string vfxId) {
context.mLuaManager->addAction(
[vfxId = std::move(vfxId)] {
if (vfxId.empty())
throw std::runtime_error("vfxId is empty");
MWBase::Environment::get().getWorld()->removeEffect(vfxId);
},
"openmw.vfx.remove");

View file

@ -210,7 +210,7 @@
---
-- Remove all VFX with the given vfxId. Best invoked through the RemoveVfx global event
-- @function [parent=#VFX] remove
-- @param #string vfxId the vfxId of the VFX to remove.
-- @param #string vfxId the vfxId of the VFX to remove. Passing an empty string removes all VFX that don't have a vfxId
--
-- @usage -- Remove all VFX with vfxId "myvfx"
-- core.sendGlobalEvent('RemoveVfx', "myvfx")