Skip to content

Commit

Permalink
compilation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shad0wshayd3 committed May 16, 2024
1 parent 7ad2db7 commit 018fefa
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
7 changes: 4 additions & 3 deletions Plugin/src/Scripts/ObScript/BetaComment.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ namespace ObScript

static bool PrintCurrentTime(std::stringstream& a_buf)
{
auto currentTime_t = std::time(nullptr);
auto currentTime_t = std::chrono::system_clock::now();
auto currentTime = std::format("{:%m/%d/%y (%H:%M)}"sv, currentTime_t);
DEBUG("CurrentTime: {:s}"sv, currentTime);

Expand Down Expand Up @@ -292,7 +292,7 @@ namespace ObScript
return help;
}

[[nodiscard]] static std::time_t GetFileTime(RE::TESFile* a_file)
[[nodiscard]] static std::chrono::system_clock::time_point GetFileTime(RE::TESFile* a_file)
{
union
{
Expand All @@ -308,7 +308,8 @@ namespace ObScript
ull.s.LowPart = a_file->fileInfo.modifyTime.lo;
ull.s.HighPart = a_file->fileInfo.modifyTime.hi;

return static_cast<std::time_t>(ull.QuadPart / 10000000ULL - 11644473600ULL);
auto time_t = static_cast<std::time_t>(ull.QuadPart / 10000000ULL - 11644473600ULL);
return std::chrono::system_clock::from_time_t(time_t);
}

static constexpr auto LONG_NAME = "BetaComment"sv;
Expand Down
4 changes: 2 additions & 2 deletions Plugin/src/Systems/Dialogue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ namespace RE
//info->parentTopic->ownerQuest->instanceData[info->parentTopic->ownerQuest->currentInstanceID]->ParseString(response, info->parentTopic->ownerQuest, info->parentTopic->ownerQuest->currentInstanceID);
}
responseText = response.data();
INFO("Response: {:s}"), responseText);
INFO("Response: {:s}", responseText);
}

// Get NPC response TopicInfo for dialogue cues.
Expand Down Expand Up @@ -513,7 +513,7 @@ namespace RE
}
}

INFO("GetDialogueOptions: Got {:s} options when checking scene {:s}."), std::to_string(options.size()), RE::Cascadia::GetPlayerCharacter()->GetCurrentScene()->GetFormEditorID());
INFO("GetDialogueOptions: Got {:s} options when checking scene {:s}.", std::to_string(options.size()), RE::Cascadia::GetPlayerCharacter()->GetCurrentScene()->GetFormEditorID());
return options;
}

Expand Down
7 changes: 3 additions & 4 deletions Plugin/src/Systems/Skills.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "Systems/Skills.h"
#include "../../../build/src/c++/CommonLibF4/workaround.h"
#include "Shared/SharedFunctions.h"

namespace RE
Expand Down Expand Up @@ -47,7 +46,7 @@ namespace RE
// Link: https://github.com/shad0wshayd3/F4SE-dev/tree/master/f4se/f4se_plugins/ProjectMassachusetts
// Rewrite Link: https://github.com/shad0wshayd3/F4SE-dev/tree/pm-rewrite

std::unordered_multimap<ActorValueInfo*, ActorValueInfo*> skillsLinkMap;
std::unordered_multimap<const ActorValueInfo*, ActorValueInfo*> skillsLinkMap;
std::unordered_multimap<std::string, ActorValueInfo*> strSkillMap;

AVVector CascadiaSkillsList;
Expand Down Expand Up @@ -93,7 +92,7 @@ namespace RE
}

// Gets given Actor Values Dependant Actor Value (if none, returns nullptr)
ActorValueInfo* GetDependantAV(ActorValueInfo* myAV)
ActorValueInfo* GetDependantAV(const ActorValueInfo* myAV)
{
auto result = skillsLinkMap.find(myAV);
if (result != skillsLinkMap.end())
Expand Down Expand Up @@ -126,7 +125,7 @@ namespace RE
}

// Returns calculation of the offset of the
float CalculateSkillOffset(const ActorValueOwner* a_actor, ActorValueInfo& a_info)
float CalculateSkillOffset(const ActorValueOwner* a_actor, const ActorValueInfo& a_info)
{
if (!a_actor || !&a_info)
{
Expand Down
6 changes: 3 additions & 3 deletions Plugin/src/Systems/Skills.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ namespace RE

ActorValueInfo* GetDependantAV(ActorValueInfo* myAV);
void AddDependentAV(ActorValueInfo* myAV, ActorValueInfo* dependantAV);
void RegisterDerivedAV(ActorValueInfo* myAV, std::function<float(const ActorValueOwner*, ActorValueInfo&)> CalcFunction);
void RegisterLinkedAV(ActorValueInfo* myAV, float (*CalcFunction)(const ActorValueOwner*, ActorValueInfo&), ActorValueInfo* av1, ActorValueInfo* av2);
float CalculateSkillOffset(const ActorValueOwner* myAVOwner, ActorValueInfo& myAV);
void RegisterDerivedAV(ActorValueInfo* myAV, std::function<RE::ActorValueInfo::DerivationFunction_t> CalcFunction);
void RegisterLinkedAV(ActorValueInfo* myAV, std::function<RE::ActorValueInfo::DerivationFunction_t> CalcFunction, ActorValueInfo* av1, ActorValueInfo* av2);
float CalculateSkillOffset(const ActorValueOwner* myAVOwner, const ActorValueInfo& myAV);
void RegisterForSkillLink();

float GetAVValue(Actor* myActor, ActorValueInfo* myAV);
Expand Down

0 comments on commit 018fefa

Please sign in to comment.