mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-11 13:25:53 -04:00
Add baseGold to NPC and creature records
This commit is contained in:
parent
c5789b5543
commit
1320261eba
@ -47,5 +47,6 @@ namespace MWLua
|
|||||||
[](const ESM::Creature& rec) -> std::string { return rec.mOriginal.serializeText(); });
|
[](const ESM::Creature& rec) -> std::string { return rec.mOriginal.serializeText(); });
|
||||||
record["soulValue"] = sol::readonly_property([](const ESM::Creature& rec) -> int { return rec.mData.mSoul; });
|
record["soulValue"] = sol::readonly_property([](const ESM::Creature& rec) -> int { return rec.mData.mSoul; });
|
||||||
record["type"] = sol::readonly_property([](const ESM::Creature& rec) -> int { return rec.mData.mType; });
|
record["type"] = sol::readonly_property([](const ESM::Creature& rec) -> int { return rec.mData.mType; });
|
||||||
|
record["baseGold"] = sol::readonly_property([](const ESM::Creature& rec) -> int { return rec.mData.mGold; });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,7 @@ namespace MWLua
|
|||||||
record["head"]
|
record["head"]
|
||||||
= sol::readonly_property([](const ESM::NPC& rec) -> std::string { return rec.mHead.serializeText(); });
|
= sol::readonly_property([](const ESM::NPC& rec) -> std::string { return rec.mHead.serializeText(); });
|
||||||
record["isMale"] = sol::readonly_property([](const ESM::NPC& rec) -> bool { return rec.isMale(); });
|
record["isMale"] = sol::readonly_property([](const ESM::NPC& rec) -> bool { return rec.isMale(); });
|
||||||
|
record["baseGold"] = sol::readonly_property([](const ESM::NPC& rec) -> int { return rec.mNpdt.mGold; });
|
||||||
|
|
||||||
// This function is game-specific, in future we should replace it with something more universal.
|
// This function is game-specific, in future we should replace it with something more universal.
|
||||||
npc["isWerewolf"] = [](const Object& o) {
|
npc["isWerewolf"] = [](const Object& o) {
|
||||||
|
@ -688,6 +688,7 @@
|
|||||||
-- @field #string mwscript
|
-- @field #string mwscript
|
||||||
-- @field #number soulValue The soul value of the creature record
|
-- @field #number soulValue The soul value of the creature record
|
||||||
-- @field #number type The @{#Creature.TYPE} of the creature
|
-- @field #number type The @{#Creature.TYPE} of the creature
|
||||||
|
-- @field #number baseGold The base barter gold of the creature
|
||||||
|
|
||||||
|
|
||||||
--- @{#NPC} functions
|
--- @{#NPC} functions
|
||||||
@ -727,6 +728,7 @@
|
|||||||
-- @field #string mwscript MWScript that is attached to this NPC
|
-- @field #string mwscript MWScript that is attached to this NPC
|
||||||
-- @field #string hair Path to the hair body part model
|
-- @field #string hair Path to the hair body part model
|
||||||
-- @field #string head Path to the head body part model
|
-- @field #string head Path to the head body part model
|
||||||
|
-- @field #number baseGold The base barter gold of the NPC
|
||||||
-- @field #bool isMale The gender setting of the NPC
|
-- @field #bool isMale The gender setting of the NPC
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user