@ -42,13 +42,13 @@ namespace {
if ( message - > type = = MessagingInterface : : kPostLoad ) {
if ( message - > type = = MessagingInterface : : kPostLoad ) {
if ( g_settings . at ( " StayAtSystemPage " ) ) {
if ( g_settings . at ( " StayAtSystemPage " ) ) {
if ( const auto pluginInfo = GetLoadInterface ( ) - > GetPluginInfo ( " StayAtSystemPage " ) ; pluginInfo ) {
if ( const auto pluginInfo = GetLoadInterface ( ) - > GetPluginInfo ( " StayAtSystemPage " ) ; pluginInfo ) {
MessageBoxW ( NULL , L " Stay At The System Page is already included in Enderal, please, disable it. " , L " Error " , MB_OK | MB_ICONERROR ) ;
MessageBoxW ( NULL , L " Stay At The System Page is already included in Enderal, please, disable it. " , L " Enderal SE E rror " , MB_OK | MB_ICONERROR ) ;
exit ( EXIT_FAILURE ) ;
exit ( EXIT_FAILURE ) ;
}
}
}
}
if ( g_settings . at ( " FlatMapMarkers " ) ) {
if ( g_settings . at ( " FlatMapMarkers " ) ) {
if ( const auto pluginInfo = GetLoadInterface ( ) - > GetPluginInfo ( " FlatMapMarkersSSE " ) ; pluginInfo ) {
if ( const auto pluginInfo = GetLoadInterface ( ) - > GetPluginInfo ( " FlatMapMarkersSSE " ) ; pluginInfo ) {
MessageBoxW ( NULL , L " Flat Map Markers is already included in Enderal, please, disable it (remove file Data \\ SKSE \\ Plugins \\ FlatMapMarkersSSE.dll). " , L " Error " , MB_OK | MB_ICONERROR ) ;
MessageBoxW ( NULL , L " Flat Map Markers is already included in Enderal, please, disable it (remove file Data \\ SKSE \\ Plugins \\ FlatMapMarkersSSE.dll). " , L " Enderal SE E rror " , MB_OK | MB_ICONERROR ) ;
exit ( EXIT_FAILURE ) ;
exit ( EXIT_FAILURE ) ;
}
}
}
}
@ -60,11 +60,11 @@ namespace {
const auto dataHandler = RE : : TESDataHandler : : GetSingleton ( ) ;
const auto dataHandler = RE : : TESDataHandler : : GetSingleton ( ) ;
if ( dataHandler ) {
if ( dataHandler ) {
if ( ! dataHandler - > LookupLoadedModByName ( " Update.esm " ) ) {
if ( ! dataHandler - > LookupLoadedModByName ( " Update.esm " ) ) {
MessageBoxW ( NULL , L " Update.esm is not loaded! " , L " Error " , MB_OK | MB_ICONERROR ) ;
MessageBoxW ( NULL , L " Update.esm is not loaded! " , L " Enderal SE E rror " , MB_OK | MB_ICONERROR ) ;
exit ( EXIT_FAILURE ) ;
exit ( EXIT_FAILURE ) ;
}
}
if ( ! dataHandler - > LookupLoadedModByName ( " Enderal - Forgotten Stories.esm " ) ) {
if ( ! dataHandler - > LookupLoadedModByName ( " Enderal - Forgotten Stories.esm " ) ) {
MessageBoxW ( NULL , L " Enderal - Forgotten Stories.esm is not loaded! " , L " Error " , MB_OK | MB_ICONERROR ) ;
MessageBoxW ( NULL , L " Enderal - Forgotten Stories.esm is not loaded! " , L " Enderal SE E rror " , MB_OK | MB_ICONERROR ) ;
exit ( EXIT_FAILURE ) ;
exit ( EXIT_FAILURE ) ;
}
}
}
}
@ -117,18 +117,23 @@ SKSEPluginLoad(const LoadInterface* skse) {
} ;
} ;
for ( int i = 0 ; i < 4 ; i + + ) {
for ( int i = 0 ; i < 4 ; i + + ) {
if ( std : : filesystem : : exists ( std : : format ( " Data \\ SKSE \\ Plugins \\ {} " , filenames [ i ] ) ) ) {
if ( std : : filesystem : : exists ( std : : format ( " Data \\ SKSE \\ Plugins \\ {} " , filenames [ i ] ) ) ) {
MessageBoxA ( NULL , std : : format ( " Found a leftover file from a previous version of Enderal SE. Please, delete Data \\ SKSE \\ Plugins \\ {}. " , filenames [ i ] ) . c_str ( ) , " Error " , MB_OK | MB_ICONERROR ) ;
MessageBoxA ( NULL , std : : format ( " Found a leftover file from a previous version of Enderal SE. Please, delete Data \\ SKSE \\ Plugins \\ {}. " , filenames [ i ] ) . c_str ( ) , " Enderal SE E rror " , MB_OK | MB_ICONERROR ) ;
exit ( EXIT_FAILURE ) ;
exit ( EXIT_FAILURE ) ;
}
}
}
}
if ( DataFileExists ( " Dawnguard.esm " ) | | DataFileExists ( " Dragonborn.esm " ) | | DataFileExists ( " HearthFires.esm " ) | | DataFileExists ( " Update.esm " ) ) {
if ( DataFileExists ( " Dawnguard.esm " ) | | DataFileExists ( " Dragonborn.esm " ) | | DataFileExists ( " HearthFires.esm " ) | | DataFileExists ( " Update.esm " ) ) {
MessageBoxW ( NULL , L " Skyrim DLCs are incompatible with Enderal. " , L " Error " , MB_OK | MB_ICONERROR ) ;
MessageBoxW ( NULL , L " Skyrim DLCs are incompatible with Enderal. " , L " Enderal SE E rror " , MB_OK | MB_ICONERROR ) ;
exit ( EXIT_FAILURE ) ;
exit ( EXIT_FAILURE ) ;
}
}
if ( DataFileExists ( " Unofficial Skyrim Special Edition Patch.esp " ) ) {
if ( DataFileExists ( " Unofficial Skyrim Special Edition Patch.esp " ) ) {
MessageBoxW ( NULL , L " Unofficial Skyrim Special Edition Patch is incompatible with Enderal. " , L " Error " , MB_OK | MB_ICONERROR ) ;
MessageBoxW ( NULL , L " Unofficial Skyrim Special Edition Patch is incompatible with Enderal. " , L " Enderal SE Error " , MB_OK | MB_ICONERROR ) ;
exit ( EXIT_FAILURE ) ;
}
if ( ! DataFileExists ( " Enderal - Forgotten Stories.esm " ) ) {
MessageBoxW ( NULL , L " Enderal - Forgotten Stories.esm is not loaded! " , L " Enderal SE Error " , MB_OK | MB_ICONERROR ) ;
exit ( EXIT_FAILURE ) ;
exit ( EXIT_FAILURE ) ;
}
}
@ -147,6 +152,10 @@ SKSEPluginLoad(const LoadInterface* skse) {
Init ( skse ) ;
Init ( skse ) ;
InitializeMessaging ( ) ;
InitializeMessaging ( ) ;
auto setting = RE : : INISettingCollection : : GetSingleton ( ) - > GetSetting ( " sIntroSequence:General " ) ;
setting - > data . s = nullptr ;
RE : : INISettingCollection : : GetSingleton ( ) - > WriteSetting ( setting ) ;
SKSE : : GetModCallbackEventSource ( ) - > AddEventSink ( EventListener : : GetSingleton ( ) ) ;
SKSE : : GetModCallbackEventSource ( ) - > AddEventSink ( EventListener : : GetSingleton ( ) ) ;
RE : : UI : : GetSingleton ( ) - > AddEventSink < RE : : MenuOpenCloseEvent > ( EventListener : : GetSingleton ( ) ) ;
RE : : UI : : GetSingleton ( ) - > AddEventSink < RE : : MenuOpenCloseEvent > ( EventListener : : GetSingleton ( ) ) ;
@ -157,7 +166,7 @@ SKSEPluginLoad(const LoadInterface* skse) {
AchievementFix : : Install ( ) ;
AchievementFix : : Install ( ) ;
}
}
if ( ! IsVR ( ) ) {
if ( ! REL : : Module : : IsVR ( ) ) {
if ( g_settings . at ( " FlatMapMarkers " ) ) {
if ( g_settings . at ( " FlatMapMarkers " ) ) {
logger : : info ( " Initializing Flat Map Markers... " ) ;
logger : : info ( " Initializing Flat Map Markers... " ) ;
FlatMapMarkers : : Install ( ) ;
FlatMapMarkers : : Install ( ) ;