1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-04-01 11:06:39 +00:00

Add setCrimeLevel

This commit is contained in:
Zackhasacat 2024-04-06 18:13:51 -05:00
parent 239d8f49d8
commit 5856bc8a0e
2 changed files with 10 additions and 0 deletions

View file

@ -186,6 +186,10 @@ namespace MWLua
const MWWorld::Class& cls = o.ptr().getClass();
return cls.getNpcStats(o.ptr()).getBounty();
};
player["setCrimeLevel"] = [](const Object& o, int amount) {
const MWWorld::Class& cls = o.ptr().getClass();
cls.getNpcStats(o.ptr()).setBounty(amount);
};
player["isCharGenFinished"] = [](const Object&) -> bool {
return MWBase::Environment::get().getWorld()->getGlobalFloat(MWWorld::Globals::sCharGenState) == -1;
};

View file

@ -1123,6 +1123,12 @@
-- @param openmw.core#GameObject player
-- @return #number
---
-- Sets the bounty or crime level of the player
-- @function [parent=#Player] setCrimeLevel
-- @param openmw.core#GameObject player
-- @param #number crimeLevel The requested crime level
---
-- Whether the character generation for this player is finished.
-- @function [parent=#Player] isCharGenFinished