Skip to content

Commit

Permalink
Fix incorrectly imported types
Browse files Browse the repository at this point in the history
  • Loading branch information
psiberx committed May 15, 2024
1 parent 8d77b46 commit 40cbe8b
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
3 changes: 0 additions & 3 deletions scripts/Base/Imports/gameuiBaseUIData.reds

This file was deleted.

3 changes: 3 additions & 0 deletions scripts/Base/Overrides/gameuiBaseUIData.reds
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
public abstract native class gameuiBaseUIData extends ISerializable {
native let id: Int64;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
public native struct scnChatter {
public native class scnChatter extends ISerializable {
native let id: Uint16;
native let voicesetComponent: wref<VoicesetComponent>;
}
2 changes: 1 addition & 1 deletion src/App/Project.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ constexpr auto Author = "psiberx";
constexpr auto NameW = L"Codeware";
constexpr auto AuthorW = L"psiberx";

constexpr auto Version = semver::from_string_noexcept("1.9.2").value();
constexpr auto Version = semver::from_string_noexcept("1.9.3").value();
}
9 changes: 7 additions & 2 deletions src/App/Scripting/ScriptingService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ constexpr auto ResourceScriptReferenceAlias = Red::CName(Red::redResourceReferen
constexpr auto ResourceReferencePrefix = Red::GetTypePrefixStr<Red::ResourceReference>();
constexpr auto ResourceAsyncReferencePrefix = Red::GetTypePrefixStr<Red::ResourceAsyncReference>();

constexpr auto KnowNameConflict = Red::CName("inkWidgetLibraryResource");
constexpr auto inkWidgetLibraryResourceTypeName = Red::CName("inkWidgetLibraryResource");
constexpr auto gameuiBaseUIDataTypeName = Red::CName("gameuiBaseUIData");
constexpr auto scnChatterTypeName = Red::CName("scnChatter");
}

App::ScriptingService::ScriptingService(const std::filesystem::path& aStateDir)
Expand Down Expand Up @@ -54,6 +56,9 @@ void App::ScriptingService::OnInitializeGameInstance()

void App::ScriptingService::OnValidateScripts(void* aValidator, Red::ScriptBundle* aBundle, void* aReport)
{
Red::GetClass<gameuiBaseUIDataTypeName>()->parent = Red::GetClass<ISerializableTypeName>();
Red::GetClass<scnChatterTypeName>()->parent = Red::GetClass<ISerializableTypeName>();

for (auto& classDef : aBundle->classes)
{
if (classDef->flags.isNative)
Expand Down Expand Up @@ -81,7 +86,7 @@ void App::ScriptingService::OnValidateScripts(void* aValidator, Red::ScriptBundl
}
}

if (classDef->flags.isStruct && classDef->name != KnowNameConflict)
if (classDef->flags.isStruct && classDef->name != inkWidgetLibraryResourceTypeName)
{
if (auto nativeClass = Red::GetScriptClass(classDef->name))
{
Expand Down
8 changes: 4 additions & 4 deletions src/App/Version.rc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#define VER_PRODUCTVERSION 1,9,2,0
#define VER_FILEVERSION 1,9,2,2405042045
#define VER_PRODUCTVERSION 1,9,3,0
#define VER_FILEVERSION 1,9,3,2405151847

#define VER_PRODUCTNAME_STR "Codeware\0"
#define VER_PRODUCTVERSION_STR "1.9.2\0"
#define VER_FILEVERSION_STR "1.9.2.2405042045\0"
#define VER_PRODUCTVERSION_STR "1.9.3\0"
#define VER_FILEVERSION_STR "1.9.3.2405151847\0"

1 VERSIONINFO
FILEVERSION VER_FILEVERSION
Expand Down
2 changes: 1 addition & 1 deletion xmake.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set_xmakever("2.5.9")

set_project("Codeware")
set_version("1.9.2", {build = "%y%m%d%H%M"})
set_version("1.9.3", {build = "%y%m%d%H%M"})

set_arch("x64")
set_languages("cxx2a")
Expand Down

0 comments on commit 40cbe8b

Please sign in to comment.