Skip to content

Commit

Permalink
v5.0.1 update for CommonLibSSE-NG - should support GOG
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveTownsend committed Nov 20, 2022
1 parent eb410ef commit 4e28b28
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.21)
# # Define project
# #######################################################################################################################
set(NAME "SmartHarvestSE")
set(VERSION 5.0.0)
set(VERSION 5.0.1)

project(
${NAME}
Expand Down
11 changes: 6 additions & 5 deletions src/Data/dataCase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,15 @@ void DataCase::FindCraftingItems(void)
{
unsigned int total(0);
unsigned int added(0);
cobj->requiredItems.ForEachContainerObject([&] (RE::ContainerObject& item) -> bool {
cobj->requiredItems.ForEachContainerObject([&] (RE::ContainerObject& item) -> RE::BSContainer::ForEachResult {
// Do not add Gold to crafting item list
if (item.obj->GetFormID() != Gold)
{
if (CraftingItems::Instance().AddIfNew(item.obj))
++added;
++total;
}
return true;
return RE::BSContainer::ForEachResult::kContinue;
});
DBG_MESSAGE("Added {} of {} items for COBJ 0x{:08x}", added, total, cobj->GetFormID());
}
Expand Down Expand Up @@ -481,22 +481,23 @@ void DataCase::ExcludeVendorContainers()
}
// does container have VendorGold?
bool matched(false);
container->ForEachContainerObject([&](RE::ContainerObject& entry) -> bool {
container->ForEachContainerObject([&](RE::ContainerObject& entry) -> RE::BSContainer::ForEachResult {
auto entryContents(entry.obj);
if (vendorGoldForms.find(entryContents->As<RE::TESLevItem>()) != vendorGoldForms.cend())
{
REL_MESSAGE("Block Vendor Container {}/0x{:08x}", container->GetName(), container->GetFormID());
matched = true;
// only continue if insert fails, not that this will likely do much good
return !m_containerBlackList.insert(container).second;
return m_containerBlackList.insert(container).second ?
RE::BSContainer::ForEachResult::kStop : RE::BSContainer::ForEachResult::kContinue;
}
else
{
DBG_MESSAGE("{}/0x{:08x} in Container {}/0x{:08x} not VendorGold", entryContents->GetName(), entryContents->GetFormID(),
container->GetName(), container->GetFormID());
}
// continue the scan
return true;
return RE::BSContainer::ForEachResult::kContinue;
});
if (!matched)
{
Expand Down
1 change: 1 addition & 0 deletions src/Utilities/StackWalker.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
// so we need not to check the version (because we only support _MSC_VER >= 1100)!
#pragma once

#include "windows.h"
#include "SKSE/Impl/PCH.h"

#if _MSC_VER >= 1900
Expand Down
1 change: 1 addition & 0 deletions src/Utilities/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ A copy of the GNU General Public License is available at
#include <iomanip>
#include <iostream>
#include <algorithm> //Trim
#include <windows.h>
#include <math.h> // pow
#include <locale>

Expand Down
1 change: 1 addition & 0 deletions src/Utilities/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ A copy of the GNU General Public License is available at
#include "Utilities/LogWrapper.h"
#include "Utilities/version.h"
#include "Utilities/utils.h"
#include <verrsrc.h>

#undef GetEnvironmentVariable
#undef GetFileVersionInfo
Expand Down
1 change: 1 addition & 0 deletions src/Utilities/versiondb.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ A copy of the GNU General Public License is available at
#include <fstream>
#include <stdio.h>
#include "SKSE/Impl/PCH.h"
#include <windows.h>

#pragma comment(lib, "version.lib")

Expand Down
4 changes: 2 additions & 2 deletions src/WorldState/PlacedObjects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void PlacedObjects::SaveREFRIfPlaced(const RE::TESObjectREFR* refr)
return;
}
const RE::TESContainer* container(const_cast<RE::TESObjectREFR*>(refr)->GetContainer());
container->ForEachContainerObject([&](RE::ContainerObject& entry) -> bool {
container->ForEachContainerObject([&](RE::ContainerObject& entry) -> RE::BSContainer::ForEachResult {
auto entryContents(entry.obj);
if (!SignatureCondition::IsValidFormType(entryContents->GetFormType()))
{
Expand All @@ -115,7 +115,7 @@ void PlacedObjects::SaveREFRIfPlaced(const RE::TESObjectREFR* refr)
RecordPlacedItem(entryContents, refr);
}
// continue the scan
return true;
return RE::BSContainer::ForEachResult::kContinue;
});
}
else
Expand Down
2 changes: 1 addition & 1 deletion vcpkg-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"kind": "git",
"repository": "https://gitlab.com/colorglass/vcpkg-colorglass",
"baseline": "1b279b20c7e0db1c9d549ff3b64e024c01317b55",
"baseline": "6fb127f7d425ae3cf3fab0f79005d907c885c0d8",
"packages": [
"commonlibsse-ng-flatrim",
"skse"
Expand Down
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
"name": "smartharvest",
"version-string": "5.0.0.0",
"version-string": "5.0.1.0",
"port-version": 0,
"description": "SKSE plugin for autoloot and related quality of life improvements",
"homepage": "https://github.com/SteveTownsend/SmartHarvestSE",
Expand Down

0 comments on commit 4e28b28

Please sign in to comment.