1

Added support for scrolls, keys, and ammo

This commit is contained in:
Eddoursul 2023-10-20 01:03:20 +02:00
parent f410fb3cfb
commit bd4d2a5f88
5 changed files with 38 additions and 6 deletions

Binary file not shown.

View File

@ -6,7 +6,7 @@ message("Using toolchain file ${CMAKE_TOOLCHAIN_FILE}.")
########################################################################################################################
project(
ArtifactTracker
VERSION 1.0.8
VERSION 1.0.9
DESCRIPTION "Artifact Tracker"
LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 23)

View File

@ -21,7 +21,7 @@ BEGIN
VALUE "FileDescription", "@PROJECT_DESCRIPTION@"
VALUE "FileVersion", "@PROJECT_VERSION@"
VALUE "InternalName", "@PROJECT_NAME@"
VALUE "LegalCopyright", "GNU Lesser General Public License 3.0"
VALUE "LegalCopyright", "ModPub Non-Commercial Private Use License 1.0"
VALUE "ProductName", "@PROJECT_FRIENDLY_NAME@"
VALUE "ProductVersion", "@PROJECT_VERSION@"
VALUE "OriginalFilename", "@PROJECT_NAME@.dll"

View File

@ -46,7 +46,15 @@ namespace ArtifactTracker
SKSE::GetModCallbackEventSource()->RemoveEventSink(EventListener::GetSingleton());
g_cellContainer = dataHandler->LookupForm(0x804, "Artifact Tracker.esp")->As<RE::TESBoundObject>(); // ETR_CellStorageContainer
if (!dataHandler->GetLoadedLightModIndex("Artifact Tracker.esp")) {
log::warn("Artifact Tracker.esp is not loaded");
RE::DebugMessageBox("Unable to find Artifact Tracker.esp, the mod is disabled.");
return false;
}
if (const auto& form = dataHandler->LookupForm(0x804, "Artifact Tracker.esp")) {
g_cellContainer = form->As<RE::TESBoundObject>(); // ETR_CellStorageContainer
}
g_listNew = dataHandler->LookupForm<RE::BGSListForm>(0x800, "Artifact Tracker.esp"); // ETR_ItemsNew
g_listStored = dataHandler->LookupForm<RE::BGSListForm>(0x801, "Artifact Tracker.esp"); // ETR_ItemsStored
@ -85,6 +93,9 @@ namespace ArtifactTracker
g_artifactAllFormTypes.insert(RE::FormType::AlchemyItem);
g_artifactAllFormTypes.insert(RE::FormType::Ingredient);
g_artifactAllFormTypes.insert(RE::FormType::SoulGem);
g_artifactAllFormTypes.insert(RE::FormType::Ammo);
g_artifactAllFormTypes.insert(RE::FormType::Scroll);
g_artifactAllFormTypes.insert(RE::FormType::KeyMaster);
g_artifactFormTypes.insert(RE::FormType::Weapon);
for (const auto& form : dataHandler->GetFormArray<RE::TESObjectWEAP>()) {
@ -145,6 +156,27 @@ namespace ArtifactTracker
}
}
for (const auto& form : dataHandler->GetFormArray<RE::TESAmmo>()) {
if (form->GetPlayable() && form->AsKeywordForm()->HasKeyword(extraArtifactKeyword) && !form->AsKeywordForm()->HasKeyword(notArtifactKeyword)) {
g_artifactMap[form->formID] = form;
g_artifactFormTypes.insert(RE::FormType::Ammo);
}
}
for (const auto& form : dataHandler->GetFormArray<RE::ScrollItem>()) {
if (form->HasKeyword(extraArtifactKeyword) && !form->HasKeyword(notArtifactKeyword)) {
g_artifactMap[form->formID] = form;
g_artifactFormTypes.insert(RE::FormType::Scroll);
}
}
for (const auto& form : dataHandler->GetFormArray<RE::TESKey>()) {
if (form->HasKeyword(extraArtifactKeyword) && !form->HasKeyword(notArtifactKeyword)) {
g_artifactMap[form->formID] = form;
g_artifactFormTypes.insert(RE::FormType::KeyMaster);
}
}
EventListener::Install();
OnGameLoad(); // covers new game and coc'ing from the main menu

View File

@ -1,11 +1,11 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
"name": "artifact-tracker",
"version-string": "1.0.8",
"version-string": "1.0.9",
"port-version": 0,
"description": "Artifact Tracker",
"homepage": "https://eddoursul.win/mods/artifact-tracker/",
"license": "LGPL-3.0",
"homepage": "https://mod.pub/skyrim-se/36-artifact-tracker",
"license": null,
"features": {
"plugin": {
"description": "Tracks found and stored artifacts.",