Track fishing maps; do not check books for the playable flag
This commit is contained in:
parent
2b1ed09b30
commit
d899a2a03f
Binary file not shown.
@ -16,7 +16,7 @@ namespace BookCheck
|
||||
const RE::BGSKeyword* recipeKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0xF5CB0, "Skyrim.esm"); // VendorItemRecipe
|
||||
|
||||
for (const auto& form : dataHandler->GetFormArray<RE::TESObjectBOOK>()) {
|
||||
if (!form || !form->GetPlayable() || form->TeachesSpell()) {
|
||||
if (!form || form->TeachesSpell()) {
|
||||
continue;
|
||||
}
|
||||
if (form->HasKeyword(recipeKeyword) || IsBook(form)) {
|
||||
@ -98,17 +98,7 @@ namespace BookCheck
|
||||
bool IsNote(const char* const modelFileName, size_t modelFileNameLength)
|
||||
{
|
||||
// Most items will use one of the note models from the base game, e.g. Note01.nif.
|
||||
if (ContainsWholeWord(modelFileName, modelFileNameLength, "Note", 4)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// The Creation Club Fishing mod does not include 'Note' the inventory art model names for the
|
||||
// regional fishing maps, instead those items use the following format: FishMap<region>.
|
||||
if (StartsWith(modelFileName, modelFileNameLength, "FishMap", 7)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return ContainsWholeWord(modelFileName, modelFileNameLength, "Note", 4);
|
||||
}
|
||||
|
||||
bool IsJournal(const char* const modelFileName, size_t modelFileNameLength)
|
||||
@ -122,12 +112,6 @@ namespace BookCheck
|
||||
return false;
|
||||
}
|
||||
|
||||
RE::BGSSoundDescriptorForm* pickupSound = book->As<RE::BGSPickupPutdownSounds>()->pickupSound;
|
||||
|
||||
if (pickupSound && pickupSound->formID == 0xC7A54) { // ITMNoteUp
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t modelFileNameLength;
|
||||
const char* const modelFileName = BookCheck::ExtractFileName(book->inventoryModel->GetModel(), modelFileNameLength);
|
||||
|
||||
@ -135,6 +119,19 @@ namespace BookCheck
|
||||
return false;
|
||||
}
|
||||
|
||||
RE::BGSSoundDescriptorForm* pickupSound = book->As<RE::BGSPickupPutdownSounds>()->pickupSound;
|
||||
|
||||
if (pickupSound && pickupSound->formID == 0xC7A54) { // ITMNoteUp
|
||||
|
||||
// The Creation Club Fishing mod does not include 'Note' the inventory art model names for the
|
||||
// regional fishing maps, instead those items use the following format: FishMap<region>.
|
||||
if (modelFileNameLength >= 11 && StartsWith(modelFileName, modelFileNameLength, "FishMap", 7)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (IsNote(modelFileName, modelFileNameLength) || IsJournal(modelFileName, modelFileNameLength)) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user