mirror of
https://github.com/OpenMW/openmw.git
synced 2025-10-18 17:46:42 +00:00
Fix autocalc, remove thing
This commit is contained in:
parent
afb7f1da54
commit
b2746a7b4b
3 changed files with 6 additions and 7 deletions
|
@ -80,10 +80,10 @@ namespace
|
||||||
npc.mFlags &= ~ESM::NPC::Essential;
|
npc.mFlags &= ~ESM::NPC::Essential;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rec["autocalc"] != sol::nil)
|
if (rec["isAutocalc"] != sol::nil)
|
||||||
{
|
{
|
||||||
bool respawn = rec["autocalc"];
|
bool autoCalc = rec["isAutocalc"];
|
||||||
if (respawn)
|
if (autoCalc)
|
||||||
npc.mFlags |= ESM::NPC::Autocalc;
|
npc.mFlags |= ESM::NPC::Autocalc;
|
||||||
else
|
else
|
||||||
npc.mFlags &= ~ESM::NPC::Autocalc;
|
npc.mFlags &= ~ESM::NPC::Autocalc;
|
||||||
|
@ -207,7 +207,7 @@ namespace MWLua
|
||||||
addModelProperty(record);
|
addModelProperty(record);
|
||||||
record["isEssential"]
|
record["isEssential"]
|
||||||
= sol::readonly_property([](const ESM::NPC& rec) -> bool { return rec.mFlags & ESM::NPC::Essential; });
|
= sol::readonly_property([](const ESM::NPC& rec) -> bool { return rec.mFlags & ESM::NPC::Essential; });
|
||||||
record["autocalc"]
|
record["isAutocalc"]
|
||||||
= sol::readonly_property([](const ESM::NPC& rec) -> bool { return rec.mFlags & ESM::NPC::Autocalc; });
|
= sol::readonly_property([](const ESM::NPC& rec) -> bool { return rec.mFlags & ESM::NPC::Autocalc; });
|
||||||
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["isRespawning"]
|
record["isRespawning"]
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#pragma once
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <components/esm3/loadnpc.hpp> // for ESM::NPC constants
|
#include <components/esm3/loadnpc.hpp>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
|
||||||
inline constexpr std::array<std::pair<int, std::string_view>, 19> ServiceNames
|
inline constexpr std::array<std::pair<int, std::string_view>, 19> ServiceNames
|
||||||
|
|
|
@ -861,7 +861,7 @@
|
||||||
-- @field #boolean canWalk whether the creature can walk
|
-- @field #boolean canWalk whether the creature can walk
|
||||||
-- @field #boolean canUseWeapons whether the creature can use weapons and shields
|
-- @field #boolean canUseWeapons whether the creature can use weapons and shields
|
||||||
-- @field #boolean isBiped whether the creature is a biped
|
-- @field #boolean isBiped whether the creature is a biped
|
||||||
-- @field #boolean autocalc If true, the actors stats will be automatically calculated based on level and class.
|
-- @field #boolean isAutocalc If true, the actors stats will be automatically calculated based on level and class.
|
||||||
-- @field #string primaryFaction Faction ID of the NPCs default faction. Nil if no faction
|
-- @field #string primaryFaction Faction ID of the NPCs default faction. Nil if no faction
|
||||||
-- @field #number primaryFactionRank Faction rank of the NPCs default faction. Nil if no faction
|
-- @field #number primaryFactionRank Faction rank of the NPCs default faction. Nil if no faction
|
||||||
-- @field #boolean isEssential whether the creature is essential
|
-- @field #boolean isEssential whether the creature is essential
|
||||||
|
|
Loading…
Reference in a new issue