Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirdEyeSqueegee committed Sep 26, 2023
1 parent a6fc6ea commit d46d173
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ message("Using toolchain file ${CMAKE_TOOLCHAIN_FILE}.")
########################################################################################################################
project(
Underwear
VERSION 1.0.4
VERSION 1.0.5
LANGUAGES CXX
)
set(CMAKE_CXX_STANDARD 23)
Expand Down
20 changes: 10 additions & 10 deletions include/PCH.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@

/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */

// clang-format off
#include <RE/Skyrim.h>
#include <REL/Relocation.h>
#include <SKSE/SKSE.h>

#include <ShlObj_core.h>
#include <Psapi.h>
// clang-format off
#include <RE/Skyrim.h>
#include <REL/Relocation.h>
#include <SKSE/SKSE.h>

#include <ShlObj_core.h>
#include <Psapi.h>
#include <Windows.h>
// clang-format on

Expand Down Expand Up @@ -199,9 +199,9 @@ class EventSingleton : public RE::BSTEventSink<TEvent>
{
using TEventSource = RE::BSTEventSource<TEvent>;

constexpr std::string dirty_name{ typeid(TEvent).name() };
const std::regex p{ "struct |RE::|SKSE::| * __ptr64" };
const auto name{ std::regex_replace(dirty_name, p, "") };
const std::string dirty_name{ typeid(TEvent).name() };
const std::regex p{ "struct |RE::|SKSE::| * __ptr64" };
const auto name{ std::regex_replace(dirty_name, p, "") };

if constexpr (std::is_base_of_v<TEventSource, RE::BSInputDeviceManager>)
{
Expand Down
13 changes: 10 additions & 3 deletions src/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ namespace Hooks
if (!a_this->GetActorBase())
return result;

if (!a_moveToRef->IsPlayerRef() || a_this->IsPlayerTeammate() || a_this->IsChild() || !a_this->HasKeywordString("ActorTypeNPC"sv)
|| a_this->HasKeywordString("ManakinRace"sv))
if (!a_moveToRef->IsPlayerRef() || a_this->IsPlayerTeammate() || a_this->IsChild() || !a_this->HasKeywordString("ActorTypeNPC"sv))
return result;

if (const auto race{ a_this->GetRace() })
if (!strcmp(race->GetFormEditorID(), "ManakinRace"))
return result;

if (const auto armo{ a_item->As<RE::TESObjectARMO>() })
{
if (const auto armo_form_id{ armo->GetFormID() }; armo->GetSlotMask() <=> body_slot == 0 && armo_form_id <=> worn->GetFormID() == 0)
Expand Down Expand Up @@ -76,9 +79,13 @@ namespace Hooks
if (!a_this->GetActorBase())
return result;

if (a_this->IsPlayerRef() || a_this->IsPlayerTeammate() || a_this->IsChild() || !a_this->HasKeywordString("ActorTypeNPC"sv) || a_this->HasKeywordString("ManakinRace"sv))
if (a_this->IsPlayerRef() || a_this->IsPlayerTeammate() || a_this->IsChild() || !a_this->HasKeywordString("ActorTypeNPC"sv))
return result;

if (const auto race{ a_this->GetRace() })
if (!strcmp(race->GetFormEditorID(), "ManakinRace"))
return result;

std::jthread([=] {
std::this_thread::sleep_for(2s);
SKSE::GetTaskInterface()->AddTask([=] {
Expand Down
2 changes: 0 additions & 2 deletions src/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#include "Settings.h"
#include "Utility.h"

#include "SKSE/Interfaces.h"

void Listener(SKSE::MessagingInterface::Message* message) noexcept
{
if (message->type <=> SKSE::MessagingInterface::kDataLoaded == 0)
Expand Down
4 changes: 2 additions & 2 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"name": "underwear",
"version-semver": "1.0.4",
"version-semver": "1.0.5",
"dependencies": ["commonlibsse-ng", "simpleini"],
"license": "GPL-3.0-or-later",
"vcpkg-configuration": {
"default-registry": {
"kind": "git",
"repository": "https://github.com/microsoft/vcpkg",
"baseline": "78ba9711d30c64a6b40462c72f356c681e2255f3"
"baseline": "70fd7df7a9e2d3d47ab6bf87fc7347a6c2d06fda"
},
"registries": [
{
Expand Down

0 comments on commit d46d173

Please sign in to comment.