Skip to content

Commit

Permalink
Removed skin from type inferring. Added missing leveled spell inferring.
Browse files Browse the repository at this point in the history
Skin wouldn't work because it would always fall into Item category.
  • Loading branch information
adya committed Apr 6, 2024
1 parent 6c0adc0 commit 830e42a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions SPID/src/LinkedDistribution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,13 @@ namespace LinkedDistribution
if (!Forms::detail::formID_to_form(dataHandler, parentFormIDs.MATCH, parentForms, path, false, false)) {
continue;
}
// Add to appropriate list. (Note that type inferring doesn't recognize SleepOutfit or DeathItems)
// Add to appropriate list. (Note that type inferring doesn't recognize SleepOutfit, Skin or DeathItems)
if (const auto keyword = form->As<RE::BGSKeyword>(); keyword) {
keywords.Link(keyword, scope, parentForms, idxOrCount, chance, path);
} else if (const auto spell = form->As<RE::SpellItem>(); spell) {
spells.Link(spell, scope, parentForms, idxOrCount, chance, path);
} else if (const auto levSpell = form->As<RE::TESLevSpell>(); levSpell) {
levSpells.Link(levSpell, scope, parentForms, idxOrCount, chance, path);
} else if (const auto perk = form->As<RE::BGSPerk>(); perk) {
perks.Link(perk, scope, parentForms, idxOrCount, chance, path);
} else if (const auto shout = form->As<RE::TESShout>(); shout) {
Expand All @@ -137,8 +139,6 @@ namespace LinkedDistribution
outfits.Link(outfit, scope, parentForms, idxOrCount, chance, path);
} else if (const auto faction = form->As<RE::TESFaction>(); faction) {
factions.Link(faction, scope, parentForms, idxOrCount, chance, path);
} else if (const auto skin = form->As<RE::TESObjectARMO>(); skin) {
skins.Link(skin, scope, parentForms, idxOrCount, chance, path);
} else {
auto type = form->GetFormType();
if (type == RE::FormType::Package || type == RE::FormType::FormList) {
Expand Down
6 changes: 3 additions & 3 deletions SPID/src/LookupForms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ bool LookupDistributables(RE::TESDataHandler* const dataHandler)
auto& genericForms = INI::configs[RECORD::kForm];

for (auto& rawForm : genericForms) {
// Add to appropriate list. (Note that type inferring doesn't recognize SleepOutfit or DeathItems)
// Add to appropriate list. (Note that type inferring doesn't recognize SleepOutfit, Skin or DeathItems)
LookupGenericForm<RE::TESForm>(dataHandler, rawForm, [&](bool isValid, auto form, const auto& idxOrCount, const auto& filters, const auto& path) {
if (const auto keyword = form->As<RE::BGSKeyword>(); keyword) {
keywords.EmplaceForm(isValid, keyword, idxOrCount, filters, path);
} else if (const auto spell = form->As<RE::SpellItem>(); spell) {
spells.EmplaceForm(isValid, spell, idxOrCount, filters, path);
} else if (const auto levSpell = form->As<RE::TESLevSpell>(); levSpell) {
levSpells.EmplaceForm(isValid, levSpell, idxOrCount, filters, path);
} else if (const auto perk = form->As<RE::BGSPerk>(); perk) {
perks.EmplaceForm(isValid, perk, idxOrCount, filters, path);
} else if (const auto shout = form->As<RE::TESShout>(); shout) {
Expand All @@ -33,8 +35,6 @@ bool LookupDistributables(RE::TESDataHandler* const dataHandler)
outfits.EmplaceForm(isValid, outfit, idxOrCount, filters, path);
} else if (const auto faction = form->As<RE::TESFaction>(); faction) {
factions.EmplaceForm(isValid, faction, idxOrCount, filters, path);
} else if (const auto skin = form->As<RE::TESObjectARMO>(); skin) {
skins.EmplaceForm(isValid, skin, idxOrCount, filters, path);
} else {
auto type = form->GetFormType();
if (type == RE::FormType::Package || type == RE::FormType::FormList) {
Expand Down

0 comments on commit 830e42a

Please sign in to comment.