9 "LocTypeDungeon",
"LocSetCave",
"LocSetCaveIce",
"LocTypeDwarvenAutomatons",
10 "LocTypeAnimalDen",
"LocTypeBanditCamp",
"LocTypeDragonPriestLair",
"LocTypeDraugrCrypt",
11 "LocTypeFalmerHive",
"LocTypeForswornCamp",
"LocTypeGiantCamp",
"LocTypeHagravenNest",
12 "LocTypeVampireLair",
"LocTypeWarlockLair",
"LocTypeWerewolfLair"};
17 static bool IsDungeon(
const RE::TESObjectCELL* a_cell)
21 if (
const auto loc = a_cell->GetLocation();
22 loc && loc->HasAnyKeywordByEditorID(
is_a_dungeon) && a_cell->IsInteriorCell())
32 static bool IsJail(RE::TESObjectCELL* a_cell)
36 const auto loc = a_cell->GetLocation();
37 if (
const auto key = RE::TESForm::LookupByEditorID<RE::BGSKeyword>(
"LocTypeJail");
38 key && loc && loc->HasKeyword(key))
49 static auto PlayerCellKeyword = RE::TESForm::LookupByEditorID<RE::BGSKeyword>(
"LocTypePlayerHouse");
50 if (PlayerCellKeyword && a_location->HasKeyword(PlayerCellKeyword))
62 std::vector<RE::Actor*> result;
66 for (
const auto& ref : a_cell->references)
70 auto actor = ref->As<RE::Actor>();
73 result.push_back(actor);
static const std::vector< std::string > is_a_dungeon
A vector of what I consider dungeon Keywords.
Definition st-cells.h:8
static bool IsPlayerHome(RE::BGSLocation *a_location)
Definition st-cells.h:45
static bool IsJail(RE::TESObjectCELL *a_cell)
Check if a cell is a Jail.
Definition st-cells.h:32
static bool IsDungeon(const RE::TESObjectCELL *a_cell)
Check if a cell is a dungeon.
Definition st-cells.h:17
static std::vector< RE::Actor * > GetAllActorsInCell(RE::TESObjectCELL *a_cell)
Get a vector of all actors in the specified cell.
Definition st-cells.h:60