mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 11:06:39 +00:00
Add setCrimeLevel
This commit is contained in:
parent
239d8f49d8
commit
5856bc8a0e
2 changed files with 10 additions and 0 deletions
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue