-
Notifications
You must be signed in to change notification settings - Fork 56
feat: @neverRef and mixedRef configuration #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds configuration support for mixedRef and neverRef types in redscript 1.0. These type configurations allow mods to specify whether types can be used with or without the w/ref modifier.
- Adds registration methods for
neverRefandmixedReftypes in the ScriptCompilationSystem - Integrates the type registration with the script compiler settings and compilation process
- Updates the redscript dependency and adjusts the include path
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/dll/Systems/ScriptCompilationSystem.hpp | Adds method declarations and member variables for storing neverRef and mixedRef types |
| src/dll/Systems/ScriptCompilationSystem.cpp | Implements registration and getter methods for the new type configurations |
| src/dll/ScriptCompiler/ScriptCompilerSettings.hpp | Adds method declarations and storage for type configurations in compiler settings |
| src/dll/ScriptCompiler/ScriptCompilerSettings.cpp | Implements registration methods and integrates type configuration into compilation process |
| src/dll/Hooks/ExecuteProcess.cpp | Adds calls to register the configured types during script compilation |
| deps/redscript | Updates redscript submodule commit |
| cmake/ConfigureAndIncludeRedscript.cmake | Updates include path for redscript headers |
What the fuck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need to add this to SDK now and expose like here https://github.com/wopss/RED4ext/blob/master/src/dll/v0/Plugin.cpp#L53
|
Are there some classes we need to add these "tags" to? Like |
|
The last case, is for CDPR mess?
|
|
The names are a bit strange, but I can't come up with better ones. The names I quickly brain stormed are:
|
On the opposite. It implies that |
Enables mods to configure types that are
mixedRefandneverReffor redscript 1.0.Basically the compiler now has rules:
@mixedRefref<Class>= it is preserved as isClass= it is preserved as is@neverRefref<Class>= errorClass= it is preserved as isref<Class>= it is preservedClass= it becomesref<Class>