1

Minor changes

This commit is contained in:
Eddoursul 2022-07-11 16:36:22 +02:00
parent e836f4134d
commit c94b76dcf0
4 changed files with 11 additions and 8 deletions

Binary file not shown.

View File

@ -7,7 +7,7 @@ message("Using toolchain file ${CMAKE_TOOLCHAIN_FILE}.")
project( project(
ArtifactTracker ArtifactTracker
VERSION 1.0.0 VERSION 1.0.0
DESCRIPTION "Eddoursul's Artifact Tracker" DESCRIPTION "Artifact Tracker"
LANGUAGES CXX) LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)

View File

@ -17,12 +17,14 @@ BEGIN
BEGIN BEGIN
BLOCK "040904b0" BLOCK "040904b0"
BEGIN BEGIN
VALUE "CompanyName", "Eddoursul (www.eddoursul.win)"
VALUE "FileDescription", "@PROJECT_DESCRIPTION@" VALUE "FileDescription", "@PROJECT_DESCRIPTION@"
VALUE "FileVersion", "@PROJECT_VERSION@" VALUE "FileVersion", "@PROJECT_VERSION@"
VALUE "InternalName", "@PROJECT_NAME@" VALUE "InternalName", "@PROJECT_NAME@"
VALUE "LegalCopyright", "MIT License" VALUE "LegalCopyright", "GNU Lesser General Public License"
VALUE "ProductName", "@PROJECT_FRIENDLY_NAME@" VALUE "ProductName", "@PROJECT_FRIENDLY_NAME@"
VALUE "ProductVersion", "@PROJECT_VERSION@" VALUE "ProductVersion", "@PROJECT_VERSION@"
VALUE "OriginalFilename", "@PROJECT_NAME@.dll"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@ -34,7 +34,7 @@ namespace ArtifactTracker
if (!dataHandler) { if (!dataHandler) {
// Called before kDataLoaded? // Called before kDataLoaded?
log::error("RE::TESDataHandler is not initialized."); log::error("DataHandler is not initialized.");
return false; return false;
} }
@ -169,7 +169,8 @@ namespace ArtifactTracker
return true; return true;
}); });
if (g_listStored->forms.size() + g_listFound->forms.size() + g_listNew->forms.size() != g_artifactMap.size()) { std::uint32_t savedCount = g_listStored->forms.size() + g_listFound->forms.size() + g_listNew->forms.size();
if (savedCount != g_artifactMap.size()) {
log::info("Reverting g_listNew"); log::info("Reverting g_listNew");
ListRevert(g_listNew); ListRevert(g_listNew);
} }
@ -355,7 +356,7 @@ namespace ArtifactTracker
} }
if (cellStorage) { if (cellStorage) {
if (!g_persistentStorage->HasForm(cellStorage)) { if (!g_persistentMap.contains(cellStorage->formID)) {
g_persistentStorage->AddForm(cellStorage); g_persistentStorage->AddForm(cellStorage);
g_persistentMap[cellStorage->formID] = cellStorage; g_persistentMap[cellStorage->formID] = cellStorage;
} }
@ -582,7 +583,7 @@ namespace ArtifactTracker
g_listStored->AddForm(form); g_listStored->AddForm(form);
} }
} else if (a_event->oldContainer == 0x14) { // dropped, consumed, dismantle, removed by script } else if (a_event->oldContainer == 0x14) { // dropped, consumed, dismantled, removed by script
if (!g_listStored->HasForm(form)) { if (!g_listStored->HasForm(form)) {
if (!GetItemCount(RE::PlayerCharacter::GetSingleton(), form) && !FollowersHaveItem(form)) { if (!GetItemCount(RE::PlayerCharacter::GetSingleton(), form) && !FollowersHaveItem(form)) {
@ -649,7 +650,7 @@ namespace ArtifactTracker
} else { } else {
const auto container = ref->As<RE::TESObjectREFR>(); const auto container = ref->As<RE::TESObjectREFR>();
if (container) { if (container) {
if (g_cellStorage && IsInSameCell(container)) { // deleted from container at home if (g_cellStorage && IsInSameCell(container)) { // removed from container at home
if (!GetItemCount(container, form)) { if (!GetItemCount(container, form)) {
SyncCellStorage(container); SyncCellStorage(container);
@ -726,7 +727,7 @@ namespace ArtifactTracker
void OnLocationChange() void OnLocationChange()
{ {
std::uint32_t iCurrentFollowers = 0; std::int32_t iCurrentFollowers = 0;
for (const auto& actor : GetPlayerFollowers()) { for (const auto& actor : GetPlayerFollowers()) {
iCurrentFollowers += actor->formID; iCurrentFollowers += actor->formID;