Beta Release v0.2.33 #57
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several important changes across the codebase, focusing on improved safety when accessing schema fields, enhancements to the command line and schema extension modules, and updates to menu and engine services. The most significant update is the addition of a mechanism to block access to "dangerous" schema fields when a particular server guideline option is enabled, helping to ensure compliance and prevent misuse.
Schema Safety and Dangerous Field Handling
A list of "dangerous" fields is now maintained in both the schema generator and the runtime schema access layer. When the
FollowCS2ServerGuidelinesoption is enabled, attempts to access or modify these fields will throw an exception, preventing unsafe operations. The generator now also prints out hashes of detected dangerous fields for developers. [1] [2] [3] [4]Command Line Integration
CommandLineServiceand interface registration:The
CommandLineServiceclass is introduced, implementing theICommandLineinterface and providing access to command line parameters. It is registered with the dependency injection container and exposed via theISwiftlyCoreinterface, making command line operations available throughout the application. [1] [2] [3] [4] [5] [6] [7]Schema Extension and Entity Enhancements
Added the
SetOrAddAttributemethod to theCAttributeListinterface and its implementation, allowing attributes to be set or added dynamically. TheCBaseModelEntityinterface and its implementation now support setting bodygroups by name and adjusting entity scale, expanding entity manipulation capabilities. [1] [2] [3] [4]Engine and Event Improvements
Engine service property updates:
The
EngineServicenow retrieves several properties (such as map name, max players, tick count, and current time) directly fromGlobalVars, improving accuracy and reducing reliance on native helpers. [1] [2]Event parameter enhancement:
The
OnCommandExecuteHookEventnow includes the original command arguments, providing more context for event handlers.Menu System Updates
Menu closing and opening operations are now routed through the
MenuManager, ensuring consistent menu state handling across the application. [1] [2] [3] [4]These changes collectively improve safety, extensibility, and maintainability, particularly by enforcing server guidelines and expanding the core API for plugins and modules.