1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-10-17 18:46:35 +00:00

Fix autocalc, remove thing

This commit is contained in:
SkyHasACat 2025-08-04 08:27:26 -07:00
parent afb7f1da54
commit b2746a7b4b
3 changed files with 6 additions and 7 deletions

View file

@ -80,10 +80,10 @@ namespace
npc.mFlags &= ~ESM::NPC::Essential;
}
if (rec["autocalc"] != sol::nil)
if (rec["isAutocalc"] != sol::nil)
{
bool respawn = rec["autocalc"];
if (respawn)
bool autoCalc = rec["isAutocalc"];
if (autoCalc)
npc.mFlags |= ESM::NPC::Autocalc;
else
npc.mFlags &= ~ESM::NPC::Autocalc;
@ -207,7 +207,7 @@ namespace MWLua
addModelProperty(record);
record["isEssential"]
= 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; });
record["isMale"] = sol::readonly_property([](const ESM::NPC& rec) -> bool { return rec.isMale(); });
record["isRespawning"]

View file

@ -1,6 +1,5 @@
#pragma once
#include <array>
#include <components/esm3/loadnpc.hpp> // for ESM::NPC constants
#include <components/esm3/loadnpc.hpp>
#include <string_view>
inline constexpr std::array<std::pair<int, std::string_view>, 19> ServiceNames

View file

@ -861,7 +861,7 @@
-- @field #boolean canWalk whether the creature can walk
-- @field #boolean canUseWeapons whether the creature can use weapons and shields
-- @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 #number primaryFactionRank Faction rank of the NPCs default faction. Nil if no faction
-- @field #boolean isEssential whether the creature is essential