virtual void execute (Interpreter::Runtime& runtime) { InterpreterContext& context = static_cast<InterpreterContext&> (runtime.getContext()); context.getInputManager().setGuiMode(mDialogue); }
MWWorld::Ptr operator() (Interpreter::Runtime& runtime) const { MWScript::InterpreterContext& context = static_cast<MWScript::InterpreterContext&> (runtime.getContext()); return context.getReference(); }
virtual void execute (Interpreter::Runtime& runtime) { InterpreterContext& context = static_cast<InterpreterContext&> (runtime.getContext()); context.getWorld().toggleCollisionMode(); }
virtual void execute (Interpreter::Runtime& runtime) { MWScript::InterpreterContext& context = static_cast<MWScript::InterpreterContext&> (runtime.getContext()); std::string id = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); MWWorld::Ptr ptr = context.getWorld().getPtr (id, false); if (mIndex==0 && MWWorld::Class::get (ptr).hasItemHealth (ptr)) { // health is a special case Interpreter::Type_Integer value = MWWorld::Class::get (ptr).getItemMaxHealth (ptr); runtime.push (value); return; } Interpreter::Type_Integer value = MWWorld::Class::get (ptr).getCreatureStats (ptr).mDynamic[mIndex]. getCurrent(); runtime.push (value); }
virtual void execute (Interpreter::Runtime& runtime) { InterpreterContext& context = static_cast<InterpreterContext&> (runtime.getContext()); context.getWindowManager().allow (mWindow); }
virtual void execute (Interpreter::Runtime& runtime) { InterpreterContext& context = static_cast<InterpreterContext&> (runtime.getContext()); MWWorld::Ptr ptr = context.getReference(); context.executeActivation(); }
virtual void execute (Interpreter::Runtime& runtime) { InterpreterContext& context = static_cast<InterpreterContext&> (runtime.getContext()); MWWorld::Ptr ptr = context.getReference(); runtime.push (context.hasBeenActivated (ptr)); }
virtual void execute (Interpreter::Runtime& runtime) { InterpreterContext& context = static_cast<InterpreterContext&> (runtime.getContext()); MWWorld::Ptr ptr = context.getReference(); runtime.push (MWBase::Environment::get().getWindowManager()->readPressedButton()); }
virtual void execute (Interpreter::Runtime& runtime) { InterpreterContext& context = static_cast<InterpreterContext&> (runtime.getContext()); bool enabled = MWBase::Environment::get().getMechanicsManager()->toggleAI(); context.report (enabled ? "AI -> On" : "AI -> Off"); }
virtual void execute (Interpreter::Runtime& runtime) { InterpreterContext& context = static_cast<InterpreterContext&> (runtime.getContext()); bool enabled = MWBase::Environment::get().getWorld()->toggleCollisionMode(); context.report (enabled ? "Collision -> On" : "Collision -> Off"); }
virtual void execute (Interpreter::Runtime& runtime) { InterpreterContext& context = static_cast<InterpreterContext&> (runtime.getContext()); bool enabled = MWBase::Environment::get().getWorld()->toggleRenderMode (MWBase::World::Render_Pathgrid); context.report (enabled ? "Path Grid rendering -> On" : "Path Grid Rendering -> Off"); }
virtual void execute(Interpreter::Runtime &runtime) { bool state = MWBase::Environment::get().getWindowManager()->toggleGui(); runtime.getContext().report(state ? "GUI -> On" : "GUI -> Off"); if (!state) { while (MWBase::Environment::get().getWindowManager()->getMode() != MWGui::GM_None) // don't use isGuiMode, or we get an infinite loop for modal message boxes! MWBase::Environment::get().getWindowManager()->popGuiMode(); } }
virtual void execute (Interpreter::Runtime& runtime) { InterpreterContext& context = static_cast<InterpreterContext&> (runtime.getContext()); bool enabled = MWBase::Environment::get().getWorld()->toggleRenderMode (MWWorld::World::Render_CollisionDebug); context.report (enabled ? "Collision Mesh Rendering -> On" : "Collision Mesh Rendering -> Off"); }
virtual void execute (Interpreter::Runtime& runtime) { MWScript::InterpreterContext& context = static_cast<MWScript::InterpreterContext&> (runtime.getContext()); MWWorld::Ptr ptr = context.getReference(); Interpreter::Type_Integer value = MWWorld::Class::get (ptr).getNpcStats (ptr).mSkill[mIndex]. getModified(); runtime.push (value); }
virtual void execute (Interpreter::Runtime& runtime) { MWScript::InterpreterContext& context = static_cast<MWScript::InterpreterContext&> (runtime.getContext()); Interpreter::Type_Integer value = runtime[0].mInteger; runtime.pop(); MWWorld::Ptr ptr = context.getReference(); MWWorld::Class::get (ptr).getCreatureStats (ptr).mAttributes[mIndex]. setModified (value, 0); }
virtual void execute(Interpreter::Runtime &runtime) { InterpreterContext& context = static_cast<InterpreterContext&> (runtime.getContext()); MWBase::World *world = MWBase::Environment::get().getWorld(); if (world->toggleVanityMode(sActivate)) { context.report(sActivate ? "Vanity Mode -> On" : "Vanity Mode -> Off"); sActivate = !sActivate; } else { context.report("Vanity Mode -> No"); } }
virtual void execute (Interpreter::Runtime& runtime) { MWScript::InterpreterContext& context = static_cast<MWScript::InterpreterContext&> (runtime.getContext()); Interpreter::Type_Integer diff = runtime[0].mInteger; runtime.pop(); MWWorld::Ptr ptr = context.getReference(); MWMechanics::CreatureStats& stats = MWWorld::Class::get (ptr).getCreatureStats (ptr); Interpreter::Type_Integer current = stats.mDynamic[mIndex].getCurrent(); stats.mDynamic[mIndex].setCurrent (diff + current); }
virtual void execute (Interpreter::Runtime& runtime) { MWScript::InterpreterContext& context = static_cast<MWScript::InterpreterContext&> (runtime.getContext()); std::string id = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); Interpreter::Type_Integer value = runtime[0].mInteger; runtime.pop(); MWWorld::Ptr ptr = context.getWorld().getPtr (id, false); MWWorld::Class::get (ptr).getCreatureStats (ptr).mAttributes[mIndex]. setModified (value, 0); }
virtual void execute (Interpreter::Runtime& runtime) { MWWorld::Ptr ptr = R()(runtime); if (!ptr.getRefData().isEnabled()) return; if (!ptr.getClass().isActor()) { const std::string error = "Warning: \"forcegreeting\" command works only for actors."; runtime.getContext().report(error); Log(Debug::Warning) << error; return; } MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Dialogue, ptr); }
virtual void execute (Interpreter::Runtime& runtime) { MWWorld::Ptr ptr = R()(runtime); MWScript::InterpreterContext& context = static_cast<MWScript::InterpreterContext&> (runtime.getContext()); std::string file = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); std::string text = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); MWBase::Environment::get().getSoundManager()->say (ptr, file); if (MWBase::Environment::get().getWindowManager ()->getSubtitlesEnabled()) context.messageBox (text); }
virtual void execute (Interpreter::Runtime& runtime) { MWScript::InterpreterContext& context = static_cast<MWScript::InterpreterContext&> (runtime.getContext()); MWWorld::Ptr ptr = context.getReference(); MWMechanics::CreatureStats& stats = MWWorld::Class::get (ptr).getCreatureStats (ptr); Interpreter::Type_Float value = 0; Interpreter::Type_Float max = stats.mDynamic[mIndex].getModified(); if (max>0) value = stats.mDynamic[mIndex].getCurrent() / max; runtime.push (value); }
virtual void execute (Interpreter::Runtime& runtime) { MWScript::InterpreterContext& context = static_cast<MWScript::InterpreterContext&> (runtime.getContext()); std::string id = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); MWWorld::Ptr ptr = context.getWorld().getPtr (id, false); MWMechanics::CreatureStats& stats = MWWorld::Class::get (ptr).getCreatureStats (ptr); Interpreter::Type_Float value = 0; Interpreter::Type_Float max = stats.mDynamic[mIndex].getModified(); if (max>0) value = stats.mDynamic[mIndex].getCurrent() / max; runtime.push (value); }
virtual void execute (Interpreter::Runtime& runtime) { MWScript::InterpreterContext& context = static_cast<MWScript::InterpreterContext&> (runtime.getContext()); std::string id = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); Interpreter::Type_Integer diff = runtime[0].mInteger; runtime.pop(); MWWorld::Ptr ptr = context.getWorld().getPtr (id, false); MWMechanics::CreatureStats& stats = MWWorld::Class::get (ptr).getCreatureStats (ptr); Interpreter::Type_Integer current = stats.mDynamic[mIndex].getCurrent(); stats.mDynamic[mIndex].setModified ( diff + stats.mDynamic[mIndex].getModified(), 0); stats.mDynamic[mIndex].setCurrent (diff + current); }
virtual void execute (Interpreter::Runtime& runtime) { runtime.getContext().report(MWBase::Environment::get().getWindowManager()->toggleFogOfWar() ? "Fog of war -> On" : "Fog of war -> Off"); }
virtual void execute (Interpreter::Runtime& runtime) { runtime.push (static_cast<InterpreterContext&> ( runtime.getContext()).hasBeenActivated()); }
virtual void execute (Interpreter::Runtime& runtime) { bool enabled = MWBase::Environment::get().getMechanicsManager()->toggleAI(); runtime.getContext().report (enabled ? "AI -> On" : "AI -> Off"); }
virtual void execute (Interpreter::Runtime& runtime) { bool enabled = MWBase::Environment::get().getWorld()->toggleCollisionMode(); runtime.getContext().report (enabled ? "Collision -> On" : "Collision -> Off"); }