mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-09 04:15:40 -04:00
Add setCrimeLevel
This commit is contained in:
parent
239d8f49d8
commit
5856bc8a0e
@ -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…
x
Reference in New Issue
Block a user