Skip to content

Commit

Permalink
[CKPE]
Browse files Browse the repository at this point in the history
SF:
- Fixed create plugin;
- Added restriction change offical dlc;
  • Loading branch information
Perchik71 committed Nov 17, 2024
1 parent 465b2ce commit 792a48c
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
15 changes: 14 additions & 1 deletion Creation Kit Platform Extended Core/Editor API/SF/TESFileSF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,20 @@ namespace CreationKitPlatformExtended
if (IsMaster()) {
auto str = FileName;

if (!str.Compare("starfield.esm"))
if (!str.Compare("starfield.esm") ||
!str.Compare("constellation.esm") ||
!str.Compare("oldmars.esm") ||
!str.Compare("sfbgs003.esm") ||
!str.Compare("sfbgs004.esm") ||
!str.Compare("sfbgs006.esm") ||
!str.Compare("sfbgs007.esm") ||
!str.Compare("sfbgs008.esm") ||
!str.Compare("sfbgs00a_a.esm") ||
!str.Compare("sfbgs00e.esm") ||
!str.Compare("sfbgs021.esm") ||
!str.Compare("sfbgs023.esm") ||
!str.Compare("sfta01.esm") ||
!str.Compare("blueprintships - starfield.esm"))
{
MessageBoxA(GetForegroundWindow(),
"Base game master files cannot be set as the active file.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ namespace CreationKitPlatformExtended
lpRelocator->PatchNop(_RELDATA_RAV(10), 9);
}


return true;
}

Expand All @@ -128,11 +127,10 @@ namespace CreationKitPlatformExtended
return false;
}

BOOL AllowSaveESMandMasterESPPatch::OpenPluginSaveDialog(HWND ParentWindow, LPCSTR BasePath, BOOL IsESM, LPSTR Buffer,
uint32_t BufferSize, LPCSTR Directory)
BOOL AllowSaveESMandMasterESPPatch::OpenPluginSaveDialog(HWND ParentWindow, BOOL IsESM, LPSTR Buffer,
uint32_t BufferSize)
{
if (!BasePath)
BasePath = "\\Data";
EditorAPI::BSString BasePath = EditorAPI::BSString::Utils::GetApplicationPath() + "Data";

const char* filter = "TES Plugin Files (*.esp)\0*.esp\0TES Light Master Files (*.esl)\0*.esl\0TES Master Files (*.esm)\0*.esm\0\0";
const char* title = "Select Target Plugin";
Expand All @@ -146,9 +144,9 @@ namespace CreationKitPlatformExtended
}

return ((bool(__fastcall*)(HWND, const char*, const char*, const char*, const char*, void*, bool, bool, char*,
uint32_t, const char*, void*))
pointer_AllowSaveESMandMasterESP_sub1)(ParentWindow, BasePath, filter, title, extension, nullptr, false, true, Buffer,
BufferSize, Directory, nullptr);
uint32_t, const char*, void*, bool))
pointer_AllowSaveESMandMasterESP_sub1)(ParentWindow, BasePath.c_str(), filter, title, extension,
nullptr, false, true, Buffer, BufferSize, nullptr, nullptr, false);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ namespace CreationKitPlatformExtended
virtual bool HasDependencies() const;
virtual Array<String> GetDependencies() const;

static BOOL OpenPluginSaveDialog(HWND ParentWindow, LPCSTR BasePath, BOOL IsESM, LPSTR Buffer,
uint32_t BufferSize, LPCSTR Directory);
static BOOL OpenPluginSaveDialog(HWND ParentWindow, BOOL IsESM, LPSTR Buffer,
uint32_t BufferSize);
protected:
virtual bool QueryFromPlatform(EDITOR_EXECUTABLE_TYPE eEditorCurrentVersion,
const char* lpcstrPlatformRuntimeVersion) const;
Expand Down
Binary file modified Creation Kit Platform Extended Core/Version/build_version.txt
Binary file not shown.
Binary file modified Creation Kit Platform Extended Core/Version/resource_version2.h
Binary file not shown.

0 comments on commit 792a48c

Please sign in to comment.