Skip to content

Commit

Permalink
Merge branch 'ejaansalah' into 'master'
Browse files Browse the repository at this point in the history
Fix the spelling of expel in lua api

See merge request OpenMW/openmw!3608
  • Loading branch information
Capostrophic committed Dec 3, 2023
2 parents 952bf58 + 9ebbdc3 commit 98dfb68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/openmw/mwlua/types/npc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ namespace MWLua
npcStats.setFactionReputation(factionId, existingReputation + value);
};

npc["expell"] = [](Object& actor, std::string_view faction) {
npc["expel"] = [](Object& actor, std::string_view faction) {
if (dynamic_cast<LObject*>(&actor) && !dynamic_cast<SelfObject*>(&actor))
throw std::runtime_error("Local scripts can modify only self");

Expand Down
6 changes: 3 additions & 3 deletions files/lua_api/openmw/types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -846,14 +846,14 @@
-- NPC.modifyFactionReputation(player, "mages guild", 5);

---
-- Expell NPC from given faction.
-- Expel NPC from given faction.
-- Throws an exception if there is no such faction.
-- Note: expelled NPC still keeps his rank and reputation in faction, he just get an additonal flag for given faction.
-- @function [parent=#NPC] expell
-- @function [parent=#NPC] expel
-- @param openmw.core#GameObject actor NPC object
-- @param #string faction Faction ID
-- @usage local NPC = require('openmw.types').NPC;
-- NPC.expell(player, "mages guild");
-- NPC.expel(player, "mages guild");

---
-- Clear expelling of NPC from given faction.
Expand Down

0 comments on commit 98dfb68

Please sign in to comment.