Bitwise-based semver to int conversion
This commit is contained in:
parent
2e978dde6d
commit
01d2b4cfd8
@ -8,7 +8,7 @@ Beware, spoilers ahead!
|
|||||||
|
|
||||||
2.1.4 (TBD)
|
2.1.4 (TBD)
|
||||||
- Chinese Simplified localization revision by DaisyComment (no translation of lines added after 2.0.12.4 yet).
|
- Chinese Simplified localization revision by DaisyComment (no translation of lines added after 2.0.12.4 yet).
|
||||||
- Fixed a random crash, occurring in outskirts of Ark and on the Farmers Coast when guards are about to start a conversation scene and any of them is riding a horse.
|
- Fixed a random crash, occurring when guards on the outskirts of Ark or on the Farmers Coast are about to start a conversation scene and any of them is riding a horse.
|
||||||
- Fixed help messages (in the middle of the screen) sometimes getting stuck in an infinite savebaked loop.
|
- Fixed help messages (in the middle of the screen) sometimes getting stuck in an infinite savebaked loop.
|
||||||
- Dreamflower can be found without finishing The Secrets first.
|
- Dreamflower can be found without finishing The Secrets first.
|
||||||
- Dimension Rift might get stuck in an infinite effect+sound loop if player left the cell while it's active.
|
- Dimension Rift might get stuck in an infinite effect+sound loop if player left the cell while it's active.
|
||||||
|
|||||||
@ -58,9 +58,8 @@ namespace Papyrus::PapyrusFunctions
|
|||||||
inline std::uint32_t GetEnderalVersionInt(RE::StaticFunctionTag*)
|
inline std::uint32_t GetEnderalVersionInt(RE::StaticFunctionTag*)
|
||||||
{
|
{
|
||||||
const auto pluginVersion = SKSE::PluginDeclaration::GetSingleton()->GetVersion();
|
const auto pluginVersion = SKSE::PluginDeclaration::GetSingleton()->GetVersion();
|
||||||
std::string versionStr = std::format("{}{}{}{}", pluginVersion.major(), pluginVersion.minor(), pluginVersion.patch(), pluginVersion.build());
|
|
||||||
|
|
||||||
return std::stoi(versionStr);
|
return SemVerToInt({ pluginVersion.major(), pluginVersion.minor(), pluginVersion.patch(), pluginVersion.build() });
|
||||||
}
|
}
|
||||||
|
|
||||||
inline RE::TESObjectREFR* GetCurrentContainer(RE::StaticFunctionTag*)
|
inline RE::TESObjectREFR* GetCurrentContainer(RE::StaticFunctionTag*)
|
||||||
|
|||||||
@ -23,6 +23,16 @@ inline uint8_t NewGameCount(bool increment = false)
|
|||||||
return g_NewGameStarted;
|
return g_NewGameStarted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline std::uint32_t SemVerToInt(std::vector<int> numbers)
|
||||||
|
{
|
||||||
|
if (numbers.size() < 4) {
|
||||||
|
logger::error("Invalid SemVerToInt argument");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (numbers[0] << 24) | (numbers[1] << 16) | (numbers[2] << 8) | numbers[3];
|
||||||
|
}
|
||||||
|
|
||||||
inline void CheckIncompatibleMods()
|
inline void CheckIncompatibleMods()
|
||||||
{
|
{
|
||||||
const auto pluginVersion = SKSE::PluginDeclaration::GetSingleton()->GetVersion();
|
const auto pluginVersion = SKSE::PluginDeclaration::GetSingleton()->GetVersion();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user